Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cron Help

Status
Not open for further replies.

Joe689

Technical User
Oct 1, 2003
6
0
0
US
I need cron to assist me in scheduling a command syntax to complete every hour. The command syntax is "python zoneclient.py Jlee40 ********** leecomp.us" This command processes a dns change. The zoneclient.py lies at /home/admin. Could someone possibly give me the text syntax needed or file that i could possibly insert to cron.hourly. I would like to avoid using crontab unless it is necessary.

I already tried creating a file within cron. hourly that said
PATH=/home/admin
python zoneclient.py Jlee40 ********** leecomp.us.


Thanks
Joe
 
file '/etc/cron.hourly'

#!/bin/sh
export PATH="/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin"
# modify PATH above as required
python /home/admin/zoneclient.py ....[snip].....


The appropriate crontab entry is

01 */1 * * * admin python /home/admin/zoneclient.py ...[snip]...

This runs at '01' minutes past the hour, every hour (*/1) every day, as user 'admin'
Be sure to restart crond after you save the change.

You only need one of these.

"Surfinbox Shares" - A fundraising program that builds revenue from dialup Internet users.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top