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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cron reading an external file

Status
Not open for further replies.

BenRussell

Programmer
Mar 12, 2001
243
US
I want CRON to read a file and execute the commands in that file just like it would using crontab. However, I want to be able to specify where the file is (for example: /etc/MYPROGRAM/jobs.cron)

Any idea how I can do this?

- Ben
 
02 4 * * * root /etc/MYPROGRAM/jobs.cron

This runs daily at 4:02AM local time as the root user. You can substitute the 'root' user with any lesser user as may be appropriate.

Surfinbox.com Business Internet Services - National Dialup, DSL, T-1 and more.
 
No, see I want the jobs.cron file to actually contain cron jobs like

* * * * * root /do/something
0 2-3 * * * root /do/something/else

and I want CRON to execute this file as if it was in the user's crontab file.

- Ben
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top