I was given a task to create a
cron which finds, kills and clears old
puppet runs that were not successfully installed.
I am more or less looking for a starting point.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
**THIS IS NOT PORTABLE TO SOLARIS**
In your cron job:
if [[ "$(uname)" = "Linux" ]];then killall --older-than 30m,1h puppet;fi
Do not attempt to run this or write this on Solaris systems. If you have Solaris systems in your infrastructure as a mixed Linux/Solaris environment, just walk away from this answer entirely.
The man pages have more documentation on the date format for killall, if you're running GNU userland.