Total Pageviews

Tuesday, 14 June 2016 is a simple Linux/BSD script which runs it arguments, but does nothing if a previous execution is still running (using a lock file.) It is ideal for use with cronjobs that run frequently (e.g. every minute) but which may have sporadic run times.


Linux/BSD (sh)1.0 – (right-click -> Save as…)863 B
Git repositoryDevelopment


./ <command> <arguments>
  • ./ wget –mirror — mirrors, but does nothing if ./ –mirror was previously launched and is still running.
  • ./ ocp — primes the website’s cache using Optimus Cache Prime, but does nothing if the cache is already being primed.


  • sh
  • md5sum and cut (to be able to run ./ with different commands simultaneously and have a separate lock for each unique command. Edit LFILE in the script if these commands aren’t available, or if you only need a single lock.)
The above commands are available on most Linux and BSD systems。