Difference between revisions of "Testing /etc/crontab"
From Biowikifarm Metawiki
(→Crontab contents) |
(→Testing the cron scripts) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 9: | Line 9: | ||
=Testing the cron scripts= | =Testing the cron scripts= | ||
− | /etc/crontab can be tested using the run-parts | + | /etc/crontab can be tested using the run-parts command |
To list the commands that would have been run daily: | To list the commands that would have been run daily: | ||
Line 26: | Line 26: | ||
</pre> | </pre> | ||
− | Weekly and Monthly commands can be tested the same way. | + | Weekly and Monthly commands can be tested the same way. |
=Testing other scripts called in crontab= | =Testing other scripts called in crontab= | ||
− | Backupscripts | + | Backupscripts other commands not in /etc/cron.xxx 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= | =Current status= | ||
− | ;November 2014 | + | ;21 November 2014 |
:Logrotate is not functioning correctly. | :Logrotate is not functioning correctly. |
Latest revision as of 20:07, 23 November 2014
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
- Scripts used by 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 command
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 other commands not in /etc/cron.xxx 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
- 21 November 2014
- Logrotate is not functioning correctly.