How to run a .php automatically, every day, at a certain time? [duplicate]

0

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?

    
asked by anonymous 12.05.2015 / 19:59

1 answer

0

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

    
12.05.2015 / 20:45