tw_cron_update utility is used to manage tideway user cron.
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
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
$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 5 cron documentation.
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
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.
$TIDEWAY/bin/tw_cron_updateas 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
- To remove a cron entry, remove its
.cronfile, or modify the file extension to something other than
.cron, (for example,
- To modify a cron entry, edit its
$TIDEWAY/bin/tw_cron_updateas the tideway user.
One use of the
tw_cron_update utility is to schedule an appliance snapshot using the
tw_scheduled_snapshot utility. The following example schedules a snapshot at 1 a.m. on the first day of every month.
- Create a new file named
- Add the cron entry to it as follows:
It is safe to use
crontab -l to see the current cron content.