Difference between revisions of "Testing /etc/crontab"
From Biowikifarm Metawiki
(Created page with "=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 ...") |
(→Testing the cron scripts) |
||
(4 intermediate revisions by one other user not shown) | |||
Line 5: | Line 5: | ||
* There are currently no monthly commands | * There are currently no monthly commands | ||
* The Backupscript, which is executed daily, but is not in /etc/cron.daily | * The Backupscript, which is executed daily, but is not in /etc/cron.daily | ||
− | * A direct call to the reboot | + | * 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= | =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.