cron job

cron job

Post by Kurt J. Lanz » Thu, 14 May 1998 04:00:00




> I need to set up a cron job that runs on the first Saturday of each month.
> I've set up crons to run hourly, daily, but never on one day of the month.
> Can this be done? If so how should I schedule it?

Try an entry like:

        * * 1-7 * 6 your-command

and RTFM while you are at it.

 
 
 

cron job

Post by Stephen Hinche » Thu, 14 May 1998 04:00:00


Quote:

> > I need to set up a cron job that runs on the first Saturday of each month.
> > I've set up crons to run hourly, daily, but never on one day of the month.
> > Can this be done? If so how should I schedule it?

> Try an entry like:

>         * * 1-7 * 6 your-command

> and RTFM while you are at it.

Actually this entry will run the command on the first seven days of the
month AND every saturday.  From the man pages for crontab

  3. As an example of specifying the two types of days:

          0 0 1,15 * 1
     would run a command on the first and  fif*th  of  each
     month,  as  well  as on every Monday.

Unfortunately, cron is not sophisticated enough to do what you want.  My
suggestion is that you write a front end.  Have cron run the front end
every saturday.  The fron end should determine if this is the first
saturday of the month.  If so the front end then invokes the actual
script.

Now I could get snotty and tell you to RTFM.  But I won't.

--

Stephen Hinchey
Director
Barbary Coast Consulting, Inc.

voice 510-653-7090
fax   510-653-7096


 
 
 

cron job

Post by Ravi C. Kuma » Fri, 15 May 1998 04:00:00


Run something similiar to this on days 1-7.

#!/bin/sh

DY=`date "+%m %Y"`

if [ `date +%d` -eq `cal $DY | awk '{if (NR==3) print $NF}'` ]; then
# It is a first saturday, do whatever
fi

--
Ravi C. Kumar

"Remove the bounce from my e-mail address to reply to me."


> > > I need to set up a cron job that runs on the first Saturday of each month.
> Have cron run the front end
> every saturday.  The fron end should determine if this is the first
> saturday of the month.  If so the front end then invokes the actual
> script.

> Now I could get snotty and tell you to RTFM.  But I won't.

> --

> Stephen Hinchey

 
 
 

1. Difference between cron job and real time job

I have a problem, when i submit a cron job to run a command the result always show some error. But issue the command in the shell everything is normal. Anybody can tell me what's the difference between cron job and real time job.

Chris kwan

--
***************************************************
Chris C.H. Kwan
Varitronix Limited
Information Service Department

Phone  : (+852) 2197-6213
Fax    : (+852) 2343-9555

URL    : http://www.varitronix.com
***************************************************

2. Idle task may not sleep

3. Cron jobs not running?

4. Ongoing mystery...

5. cron jobs on laptop

6. IS there support for DLink DFE-530TX PCI PnP Ethernet card?

7. Problem w/ cron jobs

8. Linux emulation in general and Netscape

9. mail and cron jobs - help!

10. CRON JOB !!! NEWBIE HELP

11. Help!!! cron jobs are not running

12. background change as cron job?

13. Cron jobs not working..