Skip to content

Instantly share code, notes, and snippets.

@dbiesecke
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbiesecke/ba359f53f392d513cdea to your computer and use it in GitHub Desktop.
Save dbiesecke/ba359f53f392d513cdea to your computer and use it in GitHub Desktop.
Startup / Persistence

Hint: App::Every - Makes a cron entry with 2x simple parameters.

  • Alias: alias cron-every='curl -sk 'https://raw.githubusercontent.com/iarna/App-Every/master/packed/every' | perl -X - -n -l'

  • Example: % cron-every 3 hours ls

     PATH=/home/foilo/cappucino/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
     LOCKFILE=/tmp/every_lock_b8d65f1a8f00500bbda75fc44a4d5f88
     SHELL=/bin/zsh
     54 */3 * * * [ ! -f $LOCKFILE -o ! -d /proc/`[ -f $LOCKFILE ] && cat $LOCKFILE` ] && ( echo $$ > $LOCKFILE ; cd "/home/foilo";  ls  ; rm $LOCKFILE )
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment