Professional Web Applications Themes

Cronjob on the last sunday of every month - Linux / Unix Administration

Hi, I want to run a cronjob on the last sunday of every month. Need some help. Rgds, Naveen. -- Posted via [url]http://dbforums.com[/url]...

Sponsored Links
  1. #1

    Default Cronjob on the last sunday of every month


    Hi,



    I want to run a cronjob on the last sunday of every month. Need
    some help.



    Rgds,

    Naveen.


    --
    Posted via [url]http://dbforums.com[/url]
    Sponsored Links
    urs_77 Guest

  2. #2

    Default Re: Cronjob on the last sunday of every month

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    urs_77 <member23528dbforums.com> wrote ...
    > I want to run a cronjob on the last sunday of every month. Need
    > some help.
    man (1) crontab


    - --
    Desmond Coughlan |desmond [at] zeouane [dot] org
    [url]http://www.zeouane.org/[/url]

    -----BEGIN PGP SIGNATURE-----
    Version: PGPfreeware 5.0i for non-commercial use
    Cht: noconv

    iQA/AwUBP6Vf0WiD+5zjSqyTEQJ5+QCgzp7Zh+0LKTRCMezs1b0j1k FqqJQAn3xQ
    9cVwwVq5PL0hEwrRu4sBCeT1
    =Dmj+
    -----END PGP SIGNATURE-----
    Desmond Coughlan Guest

  3. #3

    Default Re: Cronjob on the last sunday of every month

    urs_77 <member23528dbforums.com> wrote:
    > Hi,

    > I want to run a cronjob on the last sunday of every month. Need
    > some help.
    If you don't mind running it a few minutes past midnight ( early monday
    morning) it's easy

    5 0 1 * 1 < command>



    > Rgds,
    > Naveen.
    > --
    > Posted via [url]http://dbforums.com[/url]
    --
    Peter Håkanson
    IPSec Sverige ( At Gothenburg Riverside )
    Sorry about my e-mail address, but i'm trying to keep spam out,
    remove "icke-reklam" if you feel for mailing me. Thanx.
    phn@icke-reklam.ipsec.nu Guest

  4. #4

    Default Re: Cronjob on the last sunday of every month


    But crontab doesn't have an option to specify the last sunday of
    every month.



    Rgds,

    Naveen


    --
    Posted via [url]http://dbforums.com[/url]
    urs_77 Guest

  5. #5

    Default Re: Cronjob on the last sunday of every month

    Easiest way is to simply set up an entry to run every Sunday
    and modify your script to test for last Sunday of the
    month. For an example, see

    [url]http://www.sun.com/bigadmin/scripts/submittedScripts/last_sunday.txt[/url]

    - Finnbarr


    urs_77 <member23528dbforums.com> wrote in message news:<3551215.1067815160dbforums.com>...
    > But crontab doesn't have an option to specify the last sunday of
    > every month.
    >
    >
    >
    > Rgds,
    >
    > Naveen
    Finnbarr P. Murphy Guest

  6. #6

    Default Re: Cronjob on the last sunday of every month

    00 08 * * * [ `date +%d` -eq `echo \`cal | awk '{print $1}'\` |awk '{print $NF}' \`|grep -v '^$'\`| tail -n 1` ] && /script.sh
    Unregistered Guest

Similar Threads

  1. to convert a month to previous month
    By eddie wang in forum ASP
    Replies: 9
    Last Post: October 9th, 11:15 PM
  2. Displaying next sunday's date
    By J. Muenchbourg in forum ASP
    Replies: 1
    Last Post: September 17th, 09:00 PM
  3. SUNDAY TWELVE SHOP
    By Neil Truby in forum Informix
    Replies: 1
    Last Post: August 15th, 03:35 PM
  4. Anyway to run PHP script using cronjob?
    By Steven in forum PHP Development
    Replies: 3
    Last Post: July 21st, 04:39 PM
  5. AusPhotographers Competition - closes sunday
    By www.aus-photographers.com in forum Photography
    Replies: 0
    Last Post: July 17th, 09:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139