runninghorse Posted April 16, 2005 Posted April 16, 2005 I have an automatic invoicing program that I want to run every night. the invoice.php file is on my server in a folder. What do I put in the Standard Cron manager to have this file run? I've tried different combinations of http://my-TCH-site.com/folder/file.php and the direct path but I can't seem to get anything down. Quote
TCH-Bruce Posted April 17, 2005 Posted April 17, 2005 That would be something link this >php -q /home/yourcpanelname/public_html/path-to-file Quote
runninghorse Posted April 17, 2005 Author Posted April 17, 2005 Okay I tried that and get this: <br /> <b>Warning</b>: explode(): Empty delimiter. in <b>/home/myusername/public_html/coin_cron/cron_config.php</b> on line <b>41</b><br /> <br /> <b>Warning</b>: explode(): Empty delimiter. in <b>/home/mysuername/public_html/coin_cron/cron_config.php</b> on line <b>51</b><br /> <br /> <b>Warning</b>: main(/coin_includes/core.php): failed to open stream: No such file or directory in <b>/home/myusername/public_html/coin_cron/invoices.php</b> on line <b>22</b><br /> <br /> <b>Fatal error</b>: main(): Failed opening required '/coin_includes/core.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/myusername/public_html/coin_cron/invoices.php</b> on line <b>22</b><br /> Quote
runninghorse Posted April 18, 2005 Author Posted April 18, 2005 Okay it was an issue with the config file in the script. I have that fixed. Thanks for the help. The syntax worked great btw! Quote
kingram Posted January 7, 2006 Posted January 7, 2006 I have mentioned this problem in another thread. the script runs from the browser but not in cron job and I am getting this error: Warning: main(../includes/config.php): failed to open stream: No such file or directory in /home/*****/public_html/calendar/tools/send_reminders.php on line 61 I know that this is a path problem but I could not figure out how to resolve it. I tried to change the path variables in the script but no success yet. Thanks Glad you sorted it out. Quote
TCH-Bruce Posted January 7, 2006 Posted January 7, 2006 Sounds like your send_reminders.php script has an include hard coded into it which a web server will parse correctly when launched in a broswers. However when running from cron you no longer have the ability to use WGET which I believe would run the script the same as a web browser would. So you wil have to change your include in the script to have the full path to your config file. It would be something like this: >include("/home/your-cpanel-name/public_html/calendar/config.php"); Quote
kingram Posted January 7, 2006 Posted January 7, 2006 thanks! it solved that problem but I came to another one which I am trying to resolve. Sounds like your send_reminders.php script has an include hard coded into it which a web server will parse correctly when launched in a broswers. However when running from cron you no longer have the ability to use WGET which I believe would run the script the same as a web browser would. So you wil have to change your include in the script to have the full path to your config file. It would be something like this: >include("/home/your-cpanel-name/public_html/calendar/config.php"); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.