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 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 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
For full details, see the Red Hat Enterprise Linux version 7 cron documentation as this applies equally to CentOS.
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 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
.cronfile. For example, the following file runs the
tw_supportabilitycommand daily at 23:45:
- 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.