I have a php script in my website folder that needs to be executed weekly.
I am on debian 6 (root).
How can I run this php script (in cli) weekly wihtout using crontab ?
I mean which kind of file should I copy in /etc/cron.weekly to run my php file?
Just use an executable PHP script with a “shebang” line:
Make it executable:
Test it:
The “shebang” (#!) tells the shell that this script is to be executed with PHP, found in
/usr/bin/php.Alternatively, you could write a small shell script that invokes the PHP interpreter with your PHP script: