We have an Active/Standby pair of AIX 5.3 Unix servers. Business requirement dictates keeping a list of components synchronized between them e.g. Oracle RDBMS using Data Guard and certain OS file & folders which includes /var/spool/cron/crontabs.
Problem with keeping CRON related files sync'd is that they will also run on Standby which we do not want. What are some methods for preventing the jobs from executing on Standby?
My thoughts so far is stopping the "CRON" process (if that's the exact Unix process name for it) but unsure if there's a chance it might get started by a monitor process.
Cron daemon in AIX is started/restarted via init so its not so trivial to stop it.
But here I find very good idea how to stop
cron
to execute jobs: With those commands you create backup of cron table/jobs and put empty list of jobs. When need you restore from backup.Create a file on storage that is mounted on the active node only and not synced. Wrap your jobs in scripts that exit if the file does not exist. Leave cron running on both nodes.