Home » Infrastructure » Unix » Cronjob Help
Cronjob Help [message #201745] Mon, 06 November 2006 10:08 Go to next message
toshidas2000
Messages: 120
Registered: November 2005
Senior Member
All
I want to schedule a cronjob which runs first saturday of ever month. How do I do that, Please help.

Thanks
Toshi
Re: Cronjob Help [message #201760 is a reply to message #201745] Mon, 06 November 2006 10:45 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Edit:
Obviously, i was wrong. Apologies.
I will keep you posted.

Edit 2:
I was not entirely wrong.
The said article explains it.
http://en.wikipedia.org/wiki/Crontab

Set the day to be saturday (6) and check for the date.
You need to write a small wrapper within the cronjob.

[Updated on: Mon, 06 November 2006 10:49]

Report message to a moderator

Re: Cronjob Help [message #201762 is a reply to message #201760] Mon, 06 November 2006 10:57 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
something like this.
http://forum.sun.com/jive/thread.jspa?threadID=69083&messageID=255319
Re: Cronjob Help [message #203464 is a reply to message #201762] Wed, 15 November 2006 03:58 Go to previous message
prabhakarkamath
Messages: 15
Registered: February 2006
Junior Member
This must be more clear what crontab entry should look like...


crontab entry

* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (1 - 7) (monday = 1)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)


So, your crontab entry look like the following..

0 0 1,2,3,4,5,6,7 * 6 command_to_execute

Cheers!!
Previous Topic: calling korn shell script from bash defualt shell
Next Topic: Need HP - Unix documentation
Goto Forum:
  


Current Time: Thu Mar 28 21:38:04 CDT 2024