scmuser created the topic: Run php script using cronjob / crontab
How can i Run php script using cronjob / crontab???
Any ideA?
rajeshkumar replied the topic: Re: Run php script using cronjob / crontab
If your PHP scripts do have executable permissions like 755 or -rwxr-xr-x and they have one of the PHP filename extensions above, then you do not need to specify the php interpreter in the command portion of your cron line, like this:
5 17 * * 2 /myscript.php
The above cron would run myscript.php in your home directory every Tuesday at 5:05PM.
some more example…
28 14 * * * /usr/local/bin/php -q /myscript.phtml
6 3 20 4 * /usr/local/bin/php -q /htdocs/www/x.php
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn
- Best AI tools for Software Engineers - November 4, 2024
- Installing Jupyter: Get up and running on your computer - November 2, 2024
- An Introduction of SymOps by SymOps.com - October 30, 2024