Author Topic: Cron issue  (Read 328 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Cron issue
« on: February 09, 2025, 09:08:57 PM »
Sorry, I really don't know where to post this.

I'm trying to run a cron by pressing the 'run cron job now' button. The script is being executed but the parameters are not being passed. I run the same url in my browser and the parameters are being passed. The cron code looks like:
Code: [Select]
wget https://mysite.com/index.php?route=extension/common/script/cron_reset&reset=manualI'm picking up the parameter in the php script like:
Code: [Select]
$reset = $_GET['reset'];My host doesn't know what's going on as of yet.


Offline
***
Re: Cron issue
« Reply #1 on: February 09, 2025, 09:10:15 PM »
try to change the command of cron to:
Code: [Select]
wget 'https://mysite.com/index.php?route=extension/common/script/cron_reset&reset=manual'

Offline
*
Re: Cron issue
« Reply #2 on: February 09, 2025, 09:30:12 PM »
when I put quotes it doesn't execute the script at all.

Offline
***
Re: Cron issue
« Reply #3 on: February 09, 2025, 09:38:55 PM »
Try to use single (') and double (") quotes.

I think your cron doesn't pass parameters  because the chars like "?", "&" can be recognized as special chars by command line interpreted used by cron. If my guess is correct then you need to put the whole requested URL in quotes or pass the parameters in some other way.

Offline
***
Re: Cron issue
« Reply #4 on: February 09, 2025, 09:48:49 PM »
Also, try to replace 'wget' with 'curl' and see if the problem remains.

Offline
*
Re: Cron issue
« Reply #5 on: February 10, 2025, 09:43:46 PM »
it works but about what php running the back end some times got to restart it  make it work....