Skip to content

Instantly share code, notes, and snippets.

@vnglst
Last active February 23, 2016 15:04
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 vnglst/12c6a0ffeeacd2de3b92 to your computer and use it in GitHub Desktop.
Save vnglst/12c6a0ffeeacd2de3b92 to your computer and use it in GitHub Desktop.
Crontab file on Macbook for OverheidsEdits Twitter bot
MAILTO=xxxx@xxxx.de
PATH=$PATH:/usr/local/bin/
*/5 * * * * /usr/local/bin/isTermUp.sh
@reboot /usr/local/bin/forever -c /usr/local/bin/coffee ~/node/overheid/anon.coffee >> ~/node/log/overheid.log
0 12 * * * /bin/cat ~/node/log/overheid.log | /usr/bin/mail -s "OverheidsEdits Tweets Report" xxx@xxx.de
#Upstart service for anon application
#Save in /etc/init/anon.conf
description "Anon application"
author "Koen van Gilst"
start on filesystem or runlevel [2345]
stop on shutdown
# Respawn in case of a crash, with default parameters
respawn
script
export HOME=/opt/OverheidEditsApp/
echo $$ > /var/run/nodetest.pid
exec /usr/local/bin/coffee /opt/OverheidEditsApp/anon.coffee >> /root/anon.log
end script
pre-start script
echo "[`date`] Anon Starting" >> /root/anon-upstart.log
end script
pre-stop script
rm /var/run/nodetest.pid
echo "[`date`] Anon Stopping" >> /root/anon-upstart.log
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment