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

Asked

Viewed 2,528 times

0

Could someone show me how to create a rule (in Apache maybe) so that every day, at a certain time, a file .php be executed. Is there any way to do this?

  • What is the operating system?

  • http://blog.thiagobelem.net/o-que-sao-e-como-usar-as-cron-jobs/
http://e-tinet.com/linux/agendar-script-php-crontab-no-linux/

  • You use a shared hosting (Hostgator, Godaddy)?

  • linux, Nginx, php!

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: http://e-tinet.com/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.