I am working on a project where the wget
and crontab
are used to run a process in the background. I have a php
file named "Hello.php" that I want to run this every 5 minutes. I have found that if I want to have a cron job run every 5 minutes, I should use the following crontab
entries :
*/5 * * * root wget ..... # Other processes run as such
* * * * * root wget https://hello.com/cron/advertise
How can I link my "Hello.php" class with cron
to run in every 5 minutes?
I am using symfony2
.
use the console component
make it run your hello.php script
call the command in your crontab
bash /your/dir/app/console yourcommand
or even simpler run
php your/dir/hello.php