I have a php file which runs a script to pull an image from a website and save it in a folder every minute (a webcam if you're interested). If I go to the url where the file sits, the page works and the image is saved. I am trying to set up a cron job in cpanel to do this automatically so I don't have to keep my browser open. The image below shows my settings but I am getting nothing. I have set it to send me an email everytime the job runs but I don't get that either. I am new to this so any help greatly
appreciated.
Add a comment
|
1 Answer
I can't tell much from the info you gave in , but I have similar type of issue, and what I found out was that I have included .php files in my cron.php and that those links(paths) were not correct for the cron job, but were correct when I opened in browser the php file.
and please check the link in the cpanel the command curl link if it's correct I use something like this
/usr/bin/php /var/www/vhosts/something.com/httpdocs/Cron.php
4 Comments
sam
thanks I have tried: /usr/bin/php -q /home/username/public_html/index.php but still nothing.... Is there any way I can see any errors or antyhing? I have added about 5 variations to see if any work, will having some with the inccect syntax stop the others working?
denza
Try to make a cronjob.php file that will send you mail just to see if the path to the cron job is bad or the script that you are trying to run has some errors