Cron issue

Started by tester, February 09, 2025, 09:08:57 PM

Previous topic - Next topic

tester

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:
wget https://mysite.com/index.php?route=extension/common/script/cron_reset&reset=manual
I'm picking up the parameter in the php script like:
$reset = $_GET['reset'];
My host doesn't know what's going on as of yet.


cyberspace

try to change the command of cron to:

wget 'https://mysite.com/index.php?route=extension/common/script/cron_reset&reset=manual'

tester

when I put quotes it doesn't execute the script at all.

cyberspace

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.

cyberspace

Also, try to replace 'wget' with 'curl' and see if the problem remains.

james88

it works but about what php running the back end some times got to restart it  make it work....