简体   繁体   中英

Cron job is not working if i use controller path

This is the way im using from set this link to my server but they not execute properly with my schedule time/cronjob one more think there is no coding issue.....

env php -q/http://www.oriify.com/index.php/cronjob/index

can you please help me out

I did not get why you are running "env php" and not "php". Except from that, from what I see here you are trying to run an url using php and this is not normal.

just try to run the lines you have in your crontab first and see if they work. It think that a good place to start would be to replace the url to a script with the path to it and to replace that slash and replace it with a space (if what you want to do is to run a script in quiet mode)

Just use a wget instead of PHP. You are using a web address and PHP doesn't work that way. WGET performs a HTTP query which also allows for your environment vars.

wget "http://www.oriify.com/index.php/cronjob/index" -O /dev/null

I'm sure some might argue it's not proper and that running it locally is best, but locally doesn't allow for .htaccess and such.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM