tw_cron_update

The tw_cron_update utility is used to manage tideway user cron.

Warning

Do not use crontab -e to edit the tideway user cron directly on the appliance.

To use the utility, type the following command at the $TIDEWAY/bin/ directory:

tw_cron_update

Cron overview

BMC Atrium Discovery makes use of cron on the appliance to run various housekeeping tasks. This means that crontab must not be directly edited on the appliance, but must instead be managed using tw_cron_update. This way, BMC Atrium Discovery can manage cron entries across upgrades without affecting, or being affected by, any local customizations.

Cron entries are stored in $TIDEWAY/etc/cron. Each cron entry has its own file, using the file extension .cron to identify that file. A cron entry is created by adding a new file ending with .cron containing standard cron formatted commands. Similarly entries can be edited or removed by editing or removing .cron files.

$TIDEWAY/bin/tw_cron_update checks, every time it is run, that the file has not been edited since tw_cron_update was last run.

A note on the format of a cron entry is provided in the tw_cron.header file. For full details, see the Red Hat Enterprise Linux version 6 cron documentation.

Note

If crontab has been directly edited, tw_cron_update can no longer manage cron. You will have to manually resolve any differences before continuing. A copy of the expected cron configuration is stored as $TIDEWAY/etc/cron/tw_cron.previous whenever tw_cron_update is run. This can be compared to the live configuration. If this file does not exist, then the utility has never been used and crontab should be used as the default.

Managing cron entries

Cron entry files in $TIDEWAY/etc/cron are applied to the live cron configuration by running $TIDEWAY/bin/tw_cron_update as the tideway user.

  • Run $TIDEWAY/bin/tw_cron_update as the tideway user. Every time the script is run it confirms that the current live cron configuration matches what BMC Atrium Discovery expects it to be. If the configuration is as expected, there will be no output. If there is a discrepency, an appropriate message will be displayed, and the discrepency must be resolved before continuing.
  • To add a new cron entry, add a new .cron file.
  • To remove a cron entry, remove its .cron file, or modify the file extension to something other than .cron, (for example, .disabled.
  • To modify a cron entry, edit its .cron file.
  • Run $TIDEWAY/bin/tw_cron_update as the tideway user.
Was this page helpful? Yes No Submitting... Thank you

Comments