Cron Jobs not working
Ok so i am running a store and im using cron jobs to automaticly check a url for new orders but it doesnt work.
When i enter the url manually it works and it registers new orders and assigns them an api, but when i try to use cron jobs nothing happens
This is the command im running: wget --spider -O - >/dev/null 2>&1
-
In crontab jobs you must use the full path, i.e. /usr/bin/wget 0 -
im trying to get it to open a url, i dont need to use a path for that 0 -
He's saying for any commands that you use, you need to enter the full path as cron itself doesn't have a PATH directory or a home shell. I would try using this in the cron command to see if that gives you better results: /usr/bin/wget --spider -O - http://example/cron/order >/dev/null 2>&1
If not, you'll need to isolate the issue a bit more by confirming if the cron itself is actually not running through the cron logs, or if the content just isn't working how you expect.0 -
I tried the new code and it still does not work The problem is i don't have access to the logs as i dont have a dedicated server, im 99% sure the cron is running as im getting emails when i remove the " >/dev/null 2>&1 " When i assign order id's manually and enter the "example.com/order" in my browser it successfully assigns order ids so the link is also fine. The cron is just not doing what its supposed to do 0 -
If that is the case, you'll need to reach out to your hosting provider or datacenter to have them check the cron system, since you don't have enough access to be able to determine what the root cause of your issue may be. 0 -
I have the same problem, I tried a lot of suggestions and the result is the same. Cron jobs not run. When I see in vtiger Cron jobs not execute automatic. I need to run the URL /vtigercron.php to refresh my calculations fields. any idea @cPRex 0 -
@eballis - do you have root access to the server, or only access to the cPanel account? 0 -
@eballis - do you have root access to the server, or only access to the cPanel account?
Yes, I have root access0 -
Great! The first area to check is the /var/log/cron file to confirm that the cron in question is running properly. If not, I would hope that log has additional details about the error with the cron not running at all. 0 -
Great! The first area to check is the /var/log/cron file to confirm that the cron in question is running properly. If not, I would hope that log has additional details about the error with the cron not running at all.
Yes I ran, grep CRON /var/log/cron Aug 29 19:15:01 vmi1331732 CROND[30688]: (root) CMD (/usr/local/cpanel/scripts/dcpumon-wrapper >/dev/null 2>&1) Aug 29 19:16:01 vmi1331732 CROND[30726]: (magcrm) CMD (wget ) Aug 29 19:17:01 vmi1331732 CROND[30837]: (root) CMD (/usr/sbin/imunify-notifier -update-cron) Aug 29 19:18:01 vmi1331732 CROND[30869]: (root) CMD (/usr/sbin/imunify-notifier -update-cron) Aug 29 19:18:01 vmi1331732 CROND[30870]: (magcrm) CMD (wget ) Aug 29 19:20:01 vmi1331732 CROND[30939]: (root) CMD (/usr/local/cpanel/scripts/dcpumon-wrapper >/dev/null 2>&1) Aug 29 19:20:01 vmi1331732 CROND[30940]: (root) CMD (/usr/local/cpanel/scripts/eximstats_spam_check 2>&1) Aug 29 19:20:01 vmi1331732 CROND[30941]: (root) CMD (/usr/lib64/sa/sa1 1 1) Aug 29 19:20:01 vmi1331732 CROND[30943]: (root) CMD (/usr/sbin/imunify-notifier -update-cron) Aug 29 19:20:01 vmi1331732 CROND[30944]: (magcrm) CMD (wget ) ......... and more0 -
Thanks for those details. So the cron is indeed running, but it just doesn't seem to be providing the expected output. What are you expecting the wget command to do? Generally, a wget just downloads the code of the file to the local directory. 0 -
Thanks for those details. So the cron is indeed running, but it just doesn't seem to be providing the expected output. What are you expecting the wget command to do? Generally, a wget just downloads the code of the file to the local directory.
I tried all options to setup the schedule on cron in cpanel. I need to update some calculations fields and date and my modules on vtiger need to do this with cron. When I run this URL in a web browser all my data going to update so I need to run this URL or file vtigercron.php with cron to get a automatic update of my fields. see the attach files before and after run the url in the web browser.0 -
Visiting the site in a browser isn't going to be the same as using wget. It looks like you may need your authentication to be added in the URL as outlined here:
Thanks, I will try with Curl.... Vtiger have a option to check the requirements and all are in green agree to run properly, When I have any problem around permissions or versions, the result of run vtigercron.php file from web browser never update the fields and sen a message of invalid or access denied.0
Please sign in to leave a comment.
Comments
14 comments