Reputation: 315
this might be a repeat.
i would like to run my index.php every certain mins. My server has option run cron command/ cron jobs. Someone please tell me what could should I use to schedule.
Thanks in advance.
Upvotes: 0
Views: 103
Reputation: 10965
You could use this command
Minutes Hours Day Month WeekDay
45 * * * * php /path/to/index.php *
Here is an article about a php cron manager
Upvotes: 1
Reputation: 1336
First, here is how cron works:
http://en.wikipedia.org/wiki/Cron
Then, the comand should look like this:
* * * * * cd /directory/of/the/script/ && php scriptname.php >> /directory/of/the/logfile.log
Upvotes: 0
Reputation: 191819
First of all, why?
Second, crontab -e
will allow you to edit your crontab. Then it's just as easy as
? * * * * php /path/to/index.php
Upvotes: 1