Welcome to WebmasterWorld Guest from 54.159.190.106

Forum Moderators: phranque

Message Too Old, No Replies

15 minute cron job.

   
4:25 am on Oct 12, 2000 (gmt 0)

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member



So how would you go about setting up a cron job to go every fifteen minutes?

Air

5:37 am on Oct 12, 2000 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The format of the entry looks like this:

minute hour day-of-month month-of-year day-of-week command

minute 00 through 59
hour 00 through 23 (midnight is 00)
day-of-month 01 through 31
month-of-year 01 through 12
day-of-week 01 through 07 (Monday is 01, Sunday is 07)

All five fields must be specified, but an asterisk can be used to match any time/date field. So to build an entry that would run "command" every fifteen minutes you would create a file with a text editor and place an entry in it like this:

15,30,45,59 * * * * command

Which would run "command" at 15 min, 30 min, 45 min, and 59 min, of every hour, of every day, of every month, of every week.

Let's say you named that file "schedule", you would then issue the command -

crontab schedule

It will then install your crontab file with the contents of "schedule" and create a new file named after your userid.

You should not edit that file directly, instead add, delete, or modify the text file you created and issue the crontab command again, and it will replace the crontab file with the new contents.

All going well, "command" should then run as scheduled.

It's been a while since I did anything with cron, hope I haven't forgotten anything ....

7:49 am on Oct 12, 2000 (gmt 0)

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Thanks Carman,
I didn't know about "15,30,45,59" . I didn't think you could back to back them like that. I appreciate the help.
8:28 pm on Oct 12, 2000 (gmt 0)

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Worked by the way! Thanks.
6:51 pm on Oct 14, 2000 (gmt 0)

10+ Year Member



hi guys,
what's a cron job?
7:28 pm on Oct 14, 2000 (gmt 0)

WebmasterWorld Senior Member littleman is a WebmasterWorld Top Contributor of All Time 10+ Year Member



It basically is a way to automate tasks on a unix/linux system. It comes in very...
Redhat has a good description at [redhat.com ]
 

Featured Threads

Hot Threads This Week

Hot Threads This Month