Jump to content

Certain php functions + CRON?


Michdd

Recommended Posts

I was wondering if there would be a problem using an include(); function to include a connection to  a database when using CRON. I'm trying to use CRON jobs to run a script every 12 hours that dumps all the values from a certain row in my database, when I run the script myself it works perfectly, but when I use CRON it doesn't work.

 

Only thing I can think of is that CRON jobs has a problem including the connect.php file, anyone know why it isn't working?

Link to comment
https://forums.phpfreaks.com/topic/134393-certain-php-functions-cron/
Share on other sites

Are you using absolute paths within your include?

 

Cron doesn't run from where the actual php file is located so relative paths won't work.

Thanks a lot, I believe you solved this, I'll just write in the connect information in the file instead of including it, I'll try that right now.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.