MemberManual/UsingCron132019-01-14 19:16:18ClintonEbadino need to request cron permissions explicitly122013-07-22 21:38:54ClintonEbadiremove references to mire, hyperlink to crontab man page, note how to remove112013-01-14 09:22:36ClintonEbadicat102008-07-07 04:28:20localhostconverted to 1.6 markup92008-04-14 02:37:08DavidCrawshawrun-in-pagsh requires a name and a command82007-12-15 17:28:41AdamChlipalamembers2 -> members72007-12-09 22:44:21AdamChlipalaRequesting permission62007-11-14 03:54:05MichaelOlson52007-11-14 03:53:40MichaelOlsonAdd explanation of example42007-11-14 03:47:39MichaelOlsonAdd PATH tp cron example32007-11-13 23:40:05MichaelOlsonAdd run-in-pagsh to the example22007-10-28 02:09:48MichaelOlsonFlesh out12007-10-28 00:39:39MichaelOlsonOutlineThis page describes the basic use of cron on HCoop systems. PrerequisitesIt is very important that you read the Running Unattended Commands page to understand the general idea of how to run unattended commands. Making a cron configuration fileCron needs a special configuration file to tell it how to operate. It is suggested that this file be called ~/.crontab
, though it can have any name. For an explanation of the format of this file, see the crontab manual page (or run man crontab
on the shell server). Managing your cron jobsActivating your cron configurationOnce you are satisfied with your setup, run the following command to activate your changes, assuming that your configuration file is called ~/.crontab
: Disabling your cron jobsJust run crontab -r ~/.crontab
Checking your cron configurationRun crontab -l
to display the jobs cron is running for you. ExamplesOne convention for making scripts to run commands in their own PAG, as specified by the Running Unattended Commands page, is to create the ~/scripts
directory, and place your scripts there. Then, make a cron configuration file that looks something like this. The PATH line is needed so that you have access to run-in-pagsh
. Make sure you don't try to reference any other environment variables like $HOME
, because cron will not expand them properly. The first cron command runs something 9 minutes after midnight (aka the "0th" hour), every day of the month, every month, provided that it is Sunday (aka the "0th" day of the week). In short: run something at 12:09 every Sunday. The second and third commands are similar. The fourth command runs something every 10 minutes. CategoryMemberManual