Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # flock acquires a lock prior to running.
- # timeout will kill the command if it's still funning at the end of the duration.
- * * * * * flock -n /var/lock/my-task.lock timeout 45 my-task-command
- # Suppress output of command so that other crons keeping going
- * * * * * my-task-command > /dev/null 2>&1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement