Image for post
Image for post
Photo by Moritz Kindler on Unsplash
#To view current cron jobs
crontab -l
#To create new cron jobs
crontab -e
Image for post
Image for post
(Only Line 1 is required * * * * * echo ‘Hello, World!’ >> test.txt)
esc :wq
Image for post
Image for post
(crontab showing as current job and has ran 5 times)
#Every Sunday at 5:30AM
30 5 * * 0 echo 'Hello'' >> /tmp/test.txt
#Every 15 minutes
*/15 * * * * echo 'Hello'' >> /tmp/test.txt
#Workdays at 5:00PM
0 17 * * 1-5
#The 1st & 10th at Midnight
0 0 1,10 * * echo 'Hello'' >> /tmp/test.txt
crontab -r

Written by

Software Engineer — Full Stack, JavaScript, ReactJS, Ruby on Rails, OO Programming (https://www.matthewsedlacek.com/)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store