[ClusterLabs] cronjobs only on active node

Jan Pokorný jpokorny at redhat.com
Tue Jul 10 08:27:36 EDT 2018


> "Stefan K" <Shadow_7 at gmx.net> schrieb am 10.07.2018 um 11:49 in Nachricht
> <trinity-4d0ebc7c-170c-4c10-b4b9-3102ccf74949-1531216186256 at 3c-app-gmx-bs41>:
>> is it somehow possible to have a cronjob active only on the active node?
>> 
On 10/07/18 12:18 +0200, Ulrich Windl wrote:
> I had written some script to patch a crontab in HP-UX to enable and
> disable specific entries. For Linux the ISC cron is more flexible,
> and I write an RA to enable or disable specific cron entries.  So it
> has to do nothing with "actve nodes", but it can be started and
> stopped as a usual resource...
> 
>   <longdesc lang="en">OCF Resource Agent managing crontabs for ISC cron
> 
> This RA manages crontabs for the ISC cron daemon by managing links to specific
> crontabs in /etc/cron.d.
> The "start" method adds a symbolic link for the specified crontab file to
> /etc/cron.d, while the "stop" method removes that link again.
> The "monitor" method tests if a link for the specified crontab exists in
> /etc/cron.d.
> </longdesc>

See also general purpose ocf:heartbeat:symlink agent:
https://github.com/ClusterLabs/resource-agents/blob/v4.1.1/heartbeat/symlink#L46

(+ pacemaker handles systemd timer units as of 2.0.0 & upcoming 1.1.19)

-- 
Nazdar,
Poki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20180710/46927660/attachment-0002.sig>


More information about the Users mailing list