1

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.

0

**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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.