How to set cronjob with putty or terminal

Ubuntu Desktop

Posted on 21 Apr 15 by Vickey

Open your putty or terminal and login via ssh

you will see like this

[root@ip-11-142-86-04 ~]# 

Now run command

[root@ip-11-142-86-04 ~]# crontab -e

this will show the list of cronjobs if already set but you can not edit these. for edit press insert button now you can edit or add new cron job. for example if you want to add new one you will write

*/1   *     *     *    *   curl

at the place of stars you will put cronjob time


*/1 * * * * curl

MIN - Minute 0-60

HOUR - Hour [24-hour clock] 0-23

MDAY - Day of Month 1-31

MON - Month 1-12 OR jan,feb,mar,apr...

DOW - Day Of Week 0-6 OR sun,mon,tue,wed,thu,fri,sat

COMMAND - command-line

when you have done, press Esc key and you will be exit from edit mode

now type :wq and press enter you will exit from cronjob window

If this post help you reduce time to develop, you can help me to maintain this website :)