tdr170 Posted April 21, 2015 Share Posted April 21, 2015 Hi: We are switching host and are trying Hostgator, I am trying to set up a Cron job and it does not seem to work I am using the url from the Google Sitemap module as a test as I can easily look at the update time with FTP to see if it has updated. If I paste the url provided in the module into Google Chrome URL bar and hit enter the sitemap updates but the same url pasted in the Cron job url in Hostgator never seems to run. So I am wondering if anyone here has successfully setup Cron jobs on Hostgator and can give me some info as to the correct way to set it up. Our previous host did not support cron jobs so this is my first attempt to set one up. Thanks. Link to comment Share on other sites More sharing options...
tdr170 Posted April 22, 2015 Author Share Posted April 22, 2015 Just to update this, setting up a cron job is fairly easy and my issue may be that I am using a temp IP for testing. My nameservers still point to the old host for my domain so this could be an issue. I added an email to the cron jobs and do receive an email that the job has run but with an error no such file or directory exist. Odd one is that the same URL for the cron job put into the URL bar of Chrome runs fine. Update as soon as transfer is complete and nameservers updated to new host. Link to comment Share on other sites More sharing options...
bellini13 Posted April 22, 2015 Share Posted April 22, 2015 that just means the DNS servers that your computer is using has received the updated name resolution, where the DNS server that your hosting server is using did not Link to comment Share on other sites More sharing options...
tdr170 Posted May 1, 2015 Author Share Posted May 1, 2015 Update: We have completed the switch but still can not get cron jobs to run. I have copied the URL directly from the module http://my-domain.com/modules/gsitemap/gsitemap-cron.php?token=5h768x014c&id_shop=1 but I get this error, as you can see below I get two different error mails. /usr/local/cpanel/bin/jailshell: https://my-domain.com/modules/gsitemap/gsitemap-cron.php?token=5h768x014c: No such file or directory or /bin/sh: https://my-domain.com/modules/gsitemap/gsitemap-cron.php?token=5h768x014c: No such file or directory The same pasted into url bar of chrome does update the site map. Is it possible that the cron needs something more in the url since it comes from an outside source, Hostgator has a cron help section that has this Command to run a PHP 5.3 cron job: /opt/php53/bin/php /home/username/public_html/cron.php So I tried this and modified to point to the modules/gsitmap/xxxxxx and this is the error: Could not open input file: /home4/ab36288/public_html/modules/gsitemap/gsitemap-cron.php?token=5h768x014c If someone has successfully ran Cron jobs on Hostgator could sure use your input. Any Suggestions. Link to comment Share on other sites More sharing options...
tdr170 Posted May 1, 2015 Author Share Posted May 1, 2015 Really no one using Hostgator has Cron jobs working ??? Link to comment Share on other sites More sharing options...
Ableson Posted May 4, 2015 Share Posted May 4, 2015 (edited) I don't know if your cron settings are right, usualy cron settings depend of server software. [Moderate no advertising] Edited January 31, 2016 by Oron (see edit history) Link to comment Share on other sites More sharing options...
bizarre Posted May 4, 2015 Share Posted May 4, 2015 you just give the path as "php /home/<username>/public_html/......" and it should work. I have used host gator cron. Still if you see the error, check through FTP or file manager to see if the path of the file is really correct. You cannot give URL to execute, instead you have to give the absolute path of the php file. Link to comment Share on other sites More sharing options...
tdr170 Posted May 4, 2015 Author Share Posted May 4, 2015 Tried everything and none seemed to work so I tried one of the free online sevices and it worked the first time just using the URl given in the module. However I have seroius issues with Hostgator email service as I either dont receive the emails or it gets kicked back with a blocked do to spam content. The server IP at Hostgator is listed on 5 different spam sevices and I guess the my provider uses one of them. Never had this issue with Ipage so I cancelled Hostgator and renewed with Ipage. I tested with the newsletter module and the hostgator mail never arrived the Ipage newsletter came in almost instantly. Go figure. Link to comment Share on other sites More sharing options...
Guest locen Posted June 23, 2016 Share Posted June 23, 2016 (edited) Hi, what should be the syntax for cron job? I migrated my shop to another server, now domain point to the new server but probably i setted wrong cronjob. can someone help me? If i follow standard rules like this "home/username/public_html/cron.php" i receive this--> No such file or directory Please help thanks Edited June 23, 2016 by locen (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now