Report this

What is the reason for this report?

Cronjob php file not running on ubuntu

Posted on September 10, 2015

Hello ! I have a problem with the cronjob file on my droplet ! I have uploaded a website on my server ( ubuntu with lamp installed) , that site is now running on a domain on a shared hosting with Cpanel and I want to transfer it to my droplet but first I need to be sure that the script it works on my new server so I don’t have any problem with my site script , but when I try to run manually the cron job script on my browser by typing http://mydropleip/cron_job.php I see a blank page where is write this : #!/usr/bin/php which is not an normal thing , and the script is not working ! The crontab is working on my server I checked it and it works ! The only think that is not running is that cronjob script ! I think I need to install something else on the server but I don’t know what ? That cronjob is crucial for my website ! I really don’t know what I am doing wrong ! Thanks in advance !



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Thank you for the answer kamaln7 ! I made it executable but still not running I don’t get any error when I run it manually only that it doesn’t doing his job ! The strangest thing is that everything was just fine till I moved my site here :( !

If crontab is working, then it must be something within your cron_job.php. What is it suppose to do? Or what is the cron_job.php? Need more information…

The cronjob.php it supposed to get a list from an xml API and it works just fine on the shared hosting that I used till now but here just don’t work and I can’t figure out where is the problem ! Thank you !

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.