Davis's Sandbox

From tigwiki

Jump to: navigation, search

Cron Jobs: This is fairly easily done with basically any executable file type. If the code is uncompiled, just make sure that its mode is correct to be treated like an executable. To be certain, go to the folder containing the code file and enter the command: chmod 0755 [filename]. There is a linux program called “crontab”, which needs to have your program registered in order to execute it on a basis determined by the user. To do this, make a text file with the following format,


[min] [hour] [day of month] [month] [day of week] [program to be run]


An example of such a text file could be:


0,15,30,45 * * * * /home1/tigsoh/39407A2/THERfe

The above line is all you need in the text file in order to run a program called “THERfe” every 15 minutes of every hour of every day of every month. The complete path to the program is needed. When saving the file, use a *.cron file extension and name the cron file the same thing as your program. Now enter the command: crontab THERfe.cron. To see all the jobs registered as cron jobs, use the command: crontab – l. For more details visit http://www.scrounge.org/linux/cron.html.

Personal tools
Experiment Pages