From: Bit Twister on
On Wed, 19 May 2010 16:13:12 -0600, Andrew L. wrote:
> I don't believe you can get that specific with cron saying "run on the
> last Sunday of the month". You could say "run on the 28th of every
> month at 8 am":
>
> 0 8 28 * * /script
>
> (may or may not be a Sunday)
>
> You could say "run on Sunday of every month but only where Sunday is the
> 20-25th day of the month"

run the command

cal 2010

check the month October :)
20-25 is not last day of month.


From: Bit Twister on
On Wed, 19 May 2010 14:59:58 -0700 (PDT), underh20 wrote:

>
> Thanks for your suggestion. I actually need to know how to set it up
> in cron to run this script
> at 8am on last Sunday of each month, i.e.,

Do not believe there a clean way to say last whatever of month.
You put code in script to decide if last Sunday of month.

> what to put in the
> "minute", "hour", "day of the month"
> , "month of the year" and "day of the week" fields in cron. Any
> idea ?

man -s 5 cron should give you your needed information.


Or what I keep handy in the top of my cron script

####################################################################
# syntax example #
#minute (0-59), #
#| hour (0-23), #
#| | day of the month (1-31), #
#| | | month of the year (1-12), #
#| | | | day of the week (0-6 with 0=Sunday)#
#| | | | | commands #
#30 01 * * * /home/jim/bin/cleartmp #
####################################################################

So I would guess it would be
* 8 * * 0 /your/script_fn_here

From: Bit Twister on
On Thu, 20 May 2010 12:51:36 -0700 (PDT), webjuan wrote:
>
> 18 * * * 0 [`date "+%d"` -gt 24] && /path/to/script
>
> i.e. on sundays at 18:00 check if
> the day of the month is greater than
> 24 -

Would not run April 2011, June 2012, Feb,Nov 2013 :(