* * * * * php -q /home/path/file.php >> /home/path/log.txt 0 * * * * php -q /home/path/file2.php >> /home/path/log2.txt Here is my commands I want to run minutely and hourly cron I tried this but is not working. My OS is debian My path to cron is /var/spool/cron/crontabs I named the file 'root .
Ask your hosting , please restart/refresh the cron jobs. And not a single hosting allow you to run cron jobs at every minute. Command should be php /home/username/public_html/xxx.php or php -q /home/user_name//public_html/xxx.php
I'm using dedicated server. I remember there was a way to run a cronjon in the ssh console and execute the file instantly in order to try it if it is working. Do you know this method ?
You should be able to test your PHP scripts via SSH using the following commands: php /home/path/file.php >> /home/path/log.txt php /home/path/file2.php >> /home/path/log2.txt
I tested it manually and it is working but the cron is not running and executing the root.sh file I have set in /var/spool/crontab/ ...
Do you mean you have set the cron for root.sh file in which the php commands are ? Also, check the logs @ /var/log/cron to see if it shows any errors.