How to add Cron Jobs in Ubuntu?
I was facing issue for adding cron jobs in dedicated hosting (in Ubuntu). In order to add cron jobs in Ubuntu go to the terminal and type:
$ sudo crontab -e
this will open your personal crontab (cron configuration file). In every line you can define one command to run, and the format is quite simple when you get the hang of it. So the structure is:
minute hour day-of-month month day-of-week command
to run a command every monday at 2:30 in afternoon:
30 14 * * 1 /path/to/command
or every 30 minutes
*/30 * * * * /path/to/command
All done! Cron will automatically run on Ubuntu hosting.
Thanks for reading the blog.
0 Comment(s)