Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make my PHP script run at a certain time everyday? [duplicate]

Tags:

I have a PHP script that checks my database's code for validity. How can I have this run everyday at a certain time so then I can just have it run on autopilot.

like image 769
Strawberry Avatar asked Dec 29 '10 22:12

Strawberry


People also ask

How do I make PHP scripts run forever?

You can make it run forever by either setting the value or call set_time_limit in your script (http://php.net/manual/en/function.set-time-limit.php).

How long can a PHP script run?

Remember, the max execution time of a PHP script is 30 seconds.


1 Answers

What you want is called a cron job and is already covered here:

PHP: running scheduled jobs (cron jobs)

like image 96
zsalzbank Avatar answered Oct 16 '22 02:10

zsalzbank