Boran Posted July 28, 2021 Share Posted July 28, 2021 Hello everyone, We are using WHMCS version 7.10.3. Our PHP version is 7.3.29 We decided to exclude CurrencyUpdateExchangeRates and CurrencyUpdateProductPricing crons in automation settings. You can see in screenshot 1. Than, we added these two crons manually in our Plesk panel with following this documentation https://docs.whmcs.com/Crons /opt/plesk/php/7.3/bin/php -q /var/www/vhosts/username/domain.com/crons/cron.php do --CurrencyUpdateExchangeRates /opt/plesk/php/7.3/bin/php -q /var/www/vhosts/username/domain.com/crons/cron.php do --CurrencyUpdateProductPricing We would like to run this crons different time than general crons. So when we run it, crons seems to be started but nothing happens. We can see it startes in Activity Log. You can see in screenshot 2 . If we go to manually Setup -> Payments -> Currencies and click to Update Exchange Rates or Update Product Prices buttons it works. How can we fix that? Thank you for the help. 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted July 29, 2021 Share Posted July 29, 2021 How did you excluded the specific tasks ? You used `skip --CurrencyUpdateExchangeRates` on main cron.php and `do --CurrencyUpdateExchangeRates` on other with different time ? Check this https://docs.whmcs.com/Cron_Job_Issues to see if any error come up with the cron job. 0 Quote Link to comment Share on other sites More sharing options...
Boran Posted July 30, 2021 Author Share Posted July 30, 2021 On 7/29/2021 at 12:45 PM, pRieStaKos said: How did you excluded the specific tasks ? You used `skip --CurrencyUpdateExchangeRates` on main cron.php and `do --CurrencyUpdateExchangeRates` on other with different time ? Check this https://docs.whmcs.com/Cron_Job_Issues to see if any error come up with the cron job. I think you misunderstood me. We enter Automation Settings in our WHMCS Panel. As i mention in screenshot 1; There is a setting called "Currency Auto Update Settings". We just unclicked Exchange Rates and Product Prices. So WHMCS crons do every job except theese two. Then, in our Plesk panel, we added 2 crons as i mention above. There is no error as you can see in log screenshot. Cron returns succesfully but Exchange rates and Product prices are not updating. We would like to do update Exchange Rates and Product Prices by ourself with --do. 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted August 1, 2021 Share Posted August 1, 2021 (edited) That’s cause you have disabled the feature from Settings. - Try to enable it again, - Go to cron.php and add ‘skip’ and on your other cron add ‘do’. Edited August 1, 2021 by pRieStaKos 0 Quote Link to comment Share on other sites More sharing options...
Boran Posted August 13, 2021 Author Share Posted August 13, 2021 On 8/1/2021 at 1:29 PM, pRieStaKos said: That’s cause you have disabled the feature from Settings. - Try to enable it again, - Go to cron.php and add ‘skip’ and on your other cron add ‘do’. I'm sorry to disturb you again, but i'm still unable to fix this issiue. I enabled. Now, the currency rates are updated but product prices remain the same. I couldn't understand when you say : " go to cron.php and add..." We have just one cron, which is running every 5 minutes and just fetching a script (cron.php file) Then, 2 additional cron we added manually. Here are the screenshots; 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted August 13, 2021 Share Posted August 13, 2021 (edited) You must “skip” the currency rate sync on the cron you set to run daily and “do” on the cron you set manually. With this you will have one cron for the automation settings and actions (without currency sync) and your cron job to sync the currency rate at the time you have set the cron job to run. Example: php -q /home/username/crons/cron.php skip —CurrencyUpdateExchangeRates This should be the main WHMCS cron job. This will run everything except currency exchange rate sync. php -q /home/username/crons/cron.php do —CurrencyUpdateExchangeRates This should be you manually cron (set to run at the desired time). It will run only the currency exchange rate sync. Repeat for any other Tasks, by adding the —taskname with space. Edited August 13, 2021 by pRieStaKos 0 Quote Link to comment Share on other sites More sharing options...
Boran Posted August 13, 2021 Author Share Posted August 13, 2021 (edited) 30 minutes ago, pRieStaKos said: You must “skip” the currency rate sync on the cron you set to run daily and “do” on the cron you set manually. With this you will have one cron for the automation settings and actions (without currency sync) and your cron job to sync the currency rate at the time you have set the cron job to run. So, if i understand correctly ; I should change main cron to Run a command instead of Run a PHP script. Like; /opt/plesk/php/7.3/bin/php -q /path-to-folder/crons/cron.php skip --CurrencyUpdateExchangeRates --CurrencyUpdateProductPricing This command should run every 5 minutes. I will then add 2 more tasks to make it run whenever I want: /opt/plesk/php/7.3/bin/php -q /path-to-folder/crons/cron.php do --CurrencyUpdateExchangeRates /opt/plesk/php/7.3/bin/php -q /path-to-folder/crons/cron.php do --CurrencyUpdateProductPricing Am i understand clearly? : ) EDIT: I saw your updated comment. We meant the same thing. I will test it as soon as possible. Edited August 13, 2021 by Boran 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted August 13, 2021 Share Posted August 13, 2021 1 hour ago, Boran said: Am i understand clearly? : ) EDIT: I saw your updated comment. We meant the same thing. I will test it as soon as possible. Yes 0 Quote Link to comment Share on other sites More sharing options...
Boran Posted August 17, 2021 Author Share Posted August 17, 2021 On 8/13/2021 at 7:12 PM, pRieStaKos said: Yes Interesting, CurrencyUpdateExchangeRates works perfectly fine. But, CurrencyUpdateProductPricing is not working. :( 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted August 17, 2021 Share Posted August 17, 2021 1 hour ago, Boran said: Interesting, CurrencyUpdateExchangeRates works perfectly fine. But, CurrencyUpdateProductPricing is not working. 😞 On skip or do ? Check the related option on Setup > General Settings 0 Quote Link to comment Share on other sites More sharing options...
Boran Posted August 17, 2021 Author Share Posted August 17, 2021 6 hours ago, pRieStaKos said: On skip or do ? Check the related option on Setup > General Settings On do, which is my extra cron. But in the General Settings, boths are enabled( currenxy exchange, product price update) But on the main cron i added skip for both. When i check the system, i can already see theese 2 crons not working on main cron as i wanted. php do CurrencyUpdateExchangeRates works . php do CurrencyUpdateProductPricing not 😞 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted August 18, 2021 Share Posted August 18, 2021 https://help.whmcs.com/m/automation/l/683269-advanced-cron-troubleshooting 0 Quote Link to comment Share on other sites More sharing options...
Boran Posted September 23, 2021 Author Share Posted September 23, 2021 On 8/18/2021 at 2:58 PM, pRieStaKos said: https://help.whmcs.com/m/automation/l/683269-advanced-cron-troubleshooting Thanks for the help. I checked all. I think this is a BUG on this version. Because, when i run with ssh command, it shows crons complated successfully. While CurrencyUpdateExchangeRates actually works, CurrencyUpdateProductPricing isn't. 0 Quote Link to comment Share on other sites More sharing options...
pRieStaKos Posted September 24, 2021 Share Posted September 24, 2021 Open a ticket to WHMCS to resolve this. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.