Skip to content

Instantly share code, notes, and snippets.

@drocamor
Created October 15, 2010 16:01
Show Gist options
  • Save drocamor/628438 to your computer and use it in GitHub Desktop.
Save drocamor/628438 to your computer and use it in GitHub Desktop.
run some jobs once a day, at 4:20
#!/bin/bash
# cronicd - run some jobs once a day, at 4:20
# Sleep every minute until it is 4:20
while true; do
if [ `date +%H:%M` eq '16:20' ]; then # Military time bro
# Run the jobs s l o w l y
cat /etc/cronicdtab | while read job; do
nice -n 19 $job
done
# Better take a break after running those jobs
sleep 60
else
# Time to take a break
sleep 60
fi
done
/usr/local/bin/pizza_party -ogvthxdpswbeczu 5 large thin # Order some pizzas
@mrinaudo
Copy link

Example comments on line 3 and 5 (cronicd.sh) and description on top should have PM' next to 4:20' for more clarity.

@Bwoe
Copy link

Bwoe commented Apr 17, 2014

mrinaudo: By virtue, all clarity is lost @16:20, regardless of comment verbosity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment