Presentation is loading. Please wait.

Presentation is loading. Please wait.

Running the Operational Codes for the Brahmaputra Tom Hopson.

Similar presentations


Presentation on theme: "Running the Operational Codes for the Brahmaputra Tom Hopson."— Presentation transcript:

1 Running the Operational Codes for the Brahmaputra Tom Hopson

2

3 Automatic (background) Job Processing: CRON Cron is a time-base job scheduler in Unix-like computer operating systems. 'cron' is short for 'chronograph’. Cron enables users to schedule jobs (commands or shell scripts) to run automatically at a certain time or date. It is commonly used to perform system maintenance or administration, though its general purpose nature means that it can be used for other purposes, such as connecting to the Internet and downloading email.

4 Crontab file:.---------------- minute (0 - 59) |.------------- hour (0 - 23) | |.---------- day of month (1 - 31) | | |.------- month (1 - 12) OR jan,feb,mar,apr... | | | |.---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat | | | | | * * * * * command to be executed There are several special entries, most of which are just shortcuts, that can be used instead of specifying the full cron entry: EntryDescriptionEquivalent To @rebootRun once, at startup.None @yearlyRun once a year0 0 1 1 * @annually(same as @yearly)0 0 1 1 * @monthlyRun once a month0 0 1 * * @weeklyRun once a week0 0 * * 0 @dailyRun once a day0 0 * * * @midnight(same as @daily)0 0 * * * @hourlyRun once an hour0 * * * * Note: you may need to specify full paths of programs since SHELL (“dot” files) are not used by CRON

5 CRON file creation example: Create a file called, say, “cron_ex”, with: * * * * * echo "trying this out!" >> /home/hp/Desktop/CRONtalk/cron_test Then type: >crontab cron_ex (to install the CRON job) >crontab -l (to see if it is working in the CRON environment >date (to make sure a minute has passed) After a minute in your directory, you should see a file “cron_test” >cat cron_test (to see the output) Then type >crontab -r (to remove) Go to the director: cd /home/hp/Desktop/CRONtalk First steps using Linux commands:


Download ppt "Running the Operational Codes for the Brahmaputra Tom Hopson."

Similar presentations


Ads by Google