Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. # flock acquires a lock prior to running.
  2. # timeout will kill the command if it's still funning at the end of the duration.
  3. * * * * * flock -n /var/lock/my-task.lock timeout 45 my-task-command
  4.  
  5. # Suppress output of command so that other crons keeping going
  6. * * * * * my-task-command > /dev/null 2>&1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement