Cron Job PHP Problems
Hello,
I'm currently trying to implement a few cron jobs that run PHP files, but I've run into some issues.
The first cron job runs a PHP that downloads files from an external server. I initially used wget for this, and it worked fine.
The remaining 4 cron jobs push the data from the downloaded files onto my SQL server. Opening the PHP manually from my browser works fine for this, but wget does not (with or without --spider). Using curl doesn't even return an error.
I've tried using php -f -q but there seem to be issues with the path. Regardless of what path I use, I always get a "no input file specified" error. For reference, some of the paths I've tried are:
/home/[username]/public_html/[folder1]/[folder2]/file.php
/home/[username]/[websitename]/[folder1]/[folder2]/file.php
/home/[username]/public_html/[websitename]/[folder1]/[folder2]/file.php
I tried using find -ipath in case I might be getting the path wrong, but the returned path was
/public_html/[folder1]/[folder2]/file.php
which I've already tried, but doesn't work!
Any ideas on what I can do here?
Thanks!
-
I've tried using php -f -q but there seem to be issues with the path. Regardless of what path I use, I always get a "no input file specified" error. For reference, some of the paths I've tried are:
Hello, Could you let us know the specific path you are using for the PHP binary itself? Thank you.0 -
Sure! It is php -f -q /home/[username]/public_html/[folder1]/[folder2]/upload-levels.php 0 -
Hello, Is this server using EasyApache 4? If so, let us know if the following thread helps: EasyApache 4 Cron Issue Thank you. 0 -
We aren't using EasyApache 4 0 -
Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome. Thank you. 0
Please sign in to leave a comment.
Comments
5 comments