Jump to content

Recommended Posts

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.

Link to post
Share on other sites

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 />

Link to post
Share on other sites

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!

 

:clapping:

Link to post
Share on other sites
  • 8 months later...

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. ;)
Link to post
Share on other sites

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");

Link to post
Share on other sites

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");

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...