eeekingeee Posted February 2, 2013 Posted February 2, 2013 my friend create an import.php file for importing my csv file, I create a cron job: 10 * * * * /usr/bin/php http://mywebsite.com/import.php but it's never working. I tried run the script with web browser like this : http://mywebsite.com/import.php, then it can import all my products into the shop. why the cron job not working? do I need set the permission somewhere in the oscomerce directory?
germ Posted February 2, 2013 Posted February 2, 2013 10 * * * * /usr/bin/php http://mywebsite.com/import.php Try using the absolute path to the PHP script in the crontab file, not your internet URL If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
eeekingeee Posted February 2, 2013 Author Posted February 2, 2013 Thanks, I tried, the same, not working. do I need to change some setting on some file in the oscomerce? Try using the absolute path to the PHP script in the crontab file, not your internet URL
germ Posted February 2, 2013 Posted February 2, 2013 Either you have the path wrong or your host doesn't allow CRON jobs. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
eeekingeee Posted February 2, 2013 Author Posted February 2, 2013 I did tested a simple php cron job(sending a email from server), it's working perfectly, and it's in the same location with import.php, but import.php just not working. Either you have the path wrong or your host doesn't allow CRON jobs.
eeekingeee Posted February 2, 2013 Author Posted February 2, 2013 I got this error message: <b>Parse error</b>: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in <b>/homepages/55/d841766807/htdocs/all/catalog /Import.php</b> on line <b>32</b><br /> Either you have the path wrong or your host doesn't allow CRON jobs.
germ Posted February 3, 2013 Posted February 3, 2013 Well you can: 1. Fix it yourself. 2. Have your friend fix it. 3. Post the code so someone here can offer suggestions. We can't fix what we can't see... If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
Recommended Posts
Archived
This topic is now archived and is closed to further replies.