Difference between revisions of "Testing /etc/crontab"

From Biowikifarm Metawiki
Jump to: navigation, search
(Crontab contents)
m (Testing other scripts called in crontab)
Line 29: Line 29:
  
 
=Testing other scripts called in crontab=
 
=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.
+
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
 
;November 2014
 
:Logrotate is not functioning correctly.
 
:Logrotate is not functioning correctly.

Revision as of 13:42, 21 November 2014

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 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 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

November 2014
Logrotate is not functioning correctly.