EMBED YOUR TERMINAL RECORDINGS ONLINE

Flock crontab != cronoverlap

DATE: 2014-07-29
AUTHOR: sqz
AUTHOR WWW: http://linux.com
RELATED ARTICLE: http://unixhelp.ed.ac.uk/CGI/man-cgi?flock

Related recordings:

CAT COMMAND IN LINUX
tags: cat unix gnu linux view file textfile editing
LIST DIRECTORIES IN LINUX WITH LS
tags: ls directory show content linux disk beginner
SUTRAPHP-INTRODUCTION
tags: sutraphp sutra php console cli eventbased
MORE OVERVIEW IN MYSQL WITH SELECTS
tags: mysql, select, more overview, console
M4, THE HIDDEN GNU TREASURE
tags: m4, gnu, macroprocessor, template, search, replace, sed
THE UNIX TREE COMMAND
tags: unix console tree bash directory listing
DEVTODO: COMMANDLINE TODO MANAGEMEN
tags: todo xml tasks productivity management
VIM ALIGN
tags: vim align aligning text text editing text trick
VISUAL SELECTS IN VIM
tags: vim visual selects regex text editing fast
GENERATING PHP & SQL (MAPPING) CODE
tags: sutra generate sql generate database php cms mysql





EMBED THIS RECORDING:
<div><script id="playterm-MjAxNC0wNy9mbG9ja3R0eXJlYy0xNDA2NjQ5ODYyfDgweDI0" type="text/javascript" src="https://playterm.org/js/?hash=MjAxNC0wNy9mbG9ja3R0eXJlYy0xNDA2NjQ5ODYyfDgweDI0" class="size:80x24"></script></div>
I recorded this `flock   crontab != cronoverlap` shellsession because I had many unfortunate
situations where my cronjobs would overlap.

Normally cronjobs will start every X minutes/hours e.g., but what if a job takes longer?
Your server can go bananas when a cronjob hangs e.g.

Anyways, there's flock:

flock -w 0 /tmp/.mylockfile <yourcmd>

Previously I tried start-stop-daemon (debian) and daemon (centos) but this is the most portable
solution I could find.

 

Name   
Email (never shown)  
Comment