Could someone show me how to create a rule (in Apache maybe) so that every day, at a certain time, a .php
file runs. Is there any way to do this?
Could someone show me how to create a rule (in Apache maybe) so that every day, at a certain time, a .php
file runs. Is there any way to do this?
Just as you call your script in the Linux shell, you can use the PHP executable and call the script from your crontab.
To run "my-script.php" every 1 hour, do the following:
# crontab -e
00 * * * * /usr/local/bin/php /home/pedrodelfino/meu-script.php
Source: link