Cron Job with a Blank Aplication

I created a blank application and trying to run it as cron job I am getting an connection error
“The database connection was not found”
If I access the same app from my browser is working as design.

Any idea why is not finding the connection from the server via a cron job?


you must use wget to create scheduled tasks.
WGET solution is valid for windows and linux.


Thanks for your quick Response.
I am using WGET but the response from the server is “The database connection was not found”
I am seeing this on the file saved by cron job on the root dir

When using a Cron, the paths you set up have to be Absolute

Hi Ppmm, im not sure you can use Scriptcase for cronjobs. I tried this in the past and ended up writing the php scripts for the cron jobs myself. If you have found a solution via Scriptcase, I would be happy to follow you.

Cron works for me with plesk for example
url https://domain/app/index.php

1 Like

Its possible to use scriptcase for cron jobs but you have to go in to the generated code and it can get messy. I replied to a similar question on the forums before with a detailed explanation on how to edit the generate scriptcase file but that was for scriptcase 9.0. So there might be new things that need to be changed.

I would highly recommend using a custom php file and just writing your own code in there.

In my case we did not want the frontend user to be able to call the page for obvious security reasons where if you use wget I am pretty sure if the user knows the URL they can just call the URL directly and the php code on the page will run so this is what I did to resolve the problem:

Of course, this is a security concern but you can use it with any form of authentication o key to avoid any misuse of external people


To fix this i had to redeploy the full project using a zip file, I was deploying with FTP directly to the server and the problem persist, now that I learned this all my project is working fine with no errors
The cron job is working with wget directly to the url of the app with no problems