Cronjob for Linux and Mac

# Works for mac, linux (or any OS with a cron scheduler)
# To install into cron, on the console enter: crontab -e
# Then paste in the 2 lines at the bottom of this page, then save
# You can check the "/tmp/mycron.log" file on your system to verify its happening each 5 minutes

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
2,7,12,17,22,27,32,37,42,47,52,57 * * * * sleep 12 ; curl -s http://myurl.com/myscript.php >> /tmp/mycron.log 2>/dev/null

Daily reboot at 04:00

0 4 * * * /sbin/shutdown -r now

Tested on Raspberry Pi

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s