Testing /etc/crontab
From Biowikifarm Metawiki
Revision as of 13:06, 21 November 2014 by Alvaro Ortiz-Troncoso (Talk | contribs) (→Crontab contents)
Contents
Crontab contents
The commands listed in /etc/crontab are:
- Commands executed daily through anacron, stored in /etc/cron.daily
- Weekly commands in /etc/cron.weekly
- There are currently no monthly commands
- The Backupscript, which is executed daily, but is not in /etc/cron.daily
- A direct call to the reboot command, executed weekly
- A test of the Fedora media management application, which is probably used by the Key to Nature project (see documentation here: http://biowikifarm.net/meta/Definition_specs_for_Fedora_Ingestion_Service)
Testing the cron scripts
/etc/crontab can be tested using the run-parts commad
To list the commands that would have been run daily:
run-parts --list /etc/cron.daily
To test (without executing them) the commands that would have been run daily:
run-parts --test /etc/cron.daily
To run the commands that would have been run daily, with verbose output:
run-parts -v /etc/cron.daily
Weekly and Monthly commands can be tested the same way.
Testing other scripts called in crontab
Backupscripts and othe commands have to be tested by hand. Please make sure that you are using the corresponding user account and have set any environment variables required.
Current status
- November 2014
- Logrotate is not functioning correctly.