Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a cron job in linux [closed]

Tags:

linux

cron

I am using sphinx for searching. I get new data everyday which is added in the database.

I have to add this data into the sphinx search index so that it can be searched. For that I need to reindex the sphinx search index at regular intervals.

How can I set a cron in linux to do so?

like image 898
Altaf Hussain Avatar asked Jun 08 '12 08:06

Altaf Hussain


1 Answers

a crontab is defined like this:

MIN HOUR DOM MON DOW CMD

so if you want to run a task on a daily basis try:

0 0 * * * /path/to/your/script

that will trigger the launch of your script everyday at 0:00


For more details, see the cron tag wiki

like image 85
fduff Avatar answered Sep 23 '22 09:09

fduff