abdukannur Posted May 4, 2017 Share Posted May 4, 2017 Hi all, I have created a cron job at 'cron tasks manager' (v 1.4.0) for updating currency rates, but it doesn't execute. I also installed module named 'crontab for prestashop' (v 2.0.1 by samdha), still it doesn't execute. (screen shots of both modules attached) Is there any other settings I have to change for the cron to work? Prestashop version 1.6.1.5 Link to comment Share on other sites More sharing options...
jetway Posted May 4, 2017 Share Posted May 4, 2017 Hi, according to my experience the built in cron function is broke. It never worked for me either. The easiest way to get crons working is to setup a cron job in your hosting account or Server. This is the way i am doing it and it works perfect. Link to comment Share on other sites More sharing options...
abdukannur Posted May 4, 2017 Author Share Posted May 4, 2017 (edited) Hi, according to my experience the built in cron function is broke. It never worked for me either. The easiest way to get crons working is to setup a cron job in your hosting account or Server. This is the way i am doing it and it works perfect. @jetway I have tried that too, but it is not working. Is there any other settings to be enabled for that to work? I have enabled 'prestashop webservice' under advanced parameters>webservices. Edited May 4, 2017 by abdukannur (see edit history) Link to comment Share on other sites More sharing options...
DataKick Posted May 4, 2017 Share Posted May 4, 2017 Every cron module will needs an external trigger - external webservice that visits the cron page/endpoint. Cron Task Manager module has a nice feature - in basic mode it will automatically subscribe your site to prestashop cron webservice, so you don't need to worry about these. Unfortunately this subscription mechanism is somewhat buggy. In order to make it work, you usually have to 1) switch to Advanced mode - save 2) switch to Basic mode - save by switching mode the subscription will be renewed. It has worked for me. It this doesn't work, you will need to switch to advanced mode and use your own cron webservice Link to comment Share on other sites More sharing options...
Crazyweb Posted May 9, 2017 Share Posted May 9, 2017 I have the same issue. Im using a multistore, but only default store gets updated. I had this problem before with Presta 1.6 and the found an article on forge.prestashop. This one I cant find any more, but what it came down to is that something in a file had to be changed for all stores to update. I keep looking for this post, if I can find it Ill update you - Or is someone from the community knows what im talking about, please link Link to comment Share on other sites More sharing options...
Tessie Posted May 10, 2017 Share Posted May 10, 2017 If you're looking for a simpler cron job solution, you might consider webcron services like easycron which will load a specific URL at a given time. Link to comment Share on other sites More sharing options...
shobhitverma Posted April 12, 2018 Share Posted April 12, 2018 Here is the solution which worked for me on two different Prestashop 1.6 and 1.7 which is hosted on different servers but both are using cpanel. Initially, It was not working for me too, but after doing some googling and trying some combination of setting, I came up with a working solution. 1. Go to module cronjobs in your shop back office. 2. select mode as Advanced 3. Save it 4. Now add a new task by clicking plus sign under "CRON TASKS" tab 5. Provide the details: 5.1 Task Description: ANY Thing 5.2 Target Link: URL which you want to be part of cron, but check this URL in a browser window whether it is working or not. 5.3 Task Frequency: must do bellow setting (This setting is not going to work) but should be set as mention below. Every Hour Every day of the month Every Month Every day of the week 5.4 Save Finally, It should look like 1.jpeg attached image. Now there are two ways to proceed further either using Cpanel or SSH By Cpanel 1. Open Cpanel 2. Goto Advanced Tab 3. Click on the cron job 4. Enter your mail and update it 5. Then goto bellow section "Add New Cron Job." 6. Select the setting from the drop-down "Common Setting" this is the setting which will decide at what time script will execute, It will automatically fill bellow some fields 7. But there is one filed is still empty Command, to fill filed do bellow steps 7.1 Go to the shop back office, Goto module cronjobs 7.2 Under Advanced option you will see the command, something like this 0 * * * * curl -k "https://www.abc.com/backoffice/index.php?controller=AdminCronJobs&token=b7ad52c1870c1f7a758c281dd92b333c" 7.3 From this command copy from curl to last 7.4 Past it here 8. Click on Add New Cron Job. Done, Now you will now receive mail when cron job gets executed with the result By SSH 1. Connect SSH 2. Type command "crontab -e" 3. It will open vim editor where you need to mention some code; You can find that code by below steps: 3.1 Go to the shop back office, Goto module cronjobs 3.2 Under Advanced option you will see the command, something like this 0 * * * * curl -k "https://www.abc.com/backoffice/index.php?controller=AdminCronJobs&token=b7ad52c1870c1f7a758c281dd92b333c" 3.3 now in the command change this part "0 * * * *" as per your requirement, This is setting which will tell at what frequency you want to execute cron jobs You can calculate it also very quickly by this link https://crontab.[spam-filter]/ 3.4 Now your command may look like this 0 0 * * * curl -k "https://www.abc.com/backoffice/index.php?controller=AdminCronJobs&token=b7ad52c1870c1f7a758c281dd92b333c" 3.5 Now final code MAILTO="[email protected]" 0 0 * * * curl -k "https://www.abc.com/backoffice/index.php?controller=AdminCronJobs&token=b7ad52c1870c1f7a758c281dd92b333c" 3.6 Past it here 3.7 Save file and Exit 4. Done, Now you will receive mail when the job gets executed. 2 Link to comment Share on other sites More sharing options...
necrosaro420 Posted August 27, 2018 Share Posted August 27, 2018 Does this work on 1.7.4.2?? Link to comment Share on other sites More sharing options...
Knowband Plugins Posted August 27, 2018 Share Posted August 27, 2018 Yes, Go to Modules -> Cron tasks manager. Configure the module. Select the "Advanced" mode press save button. You will get the URL which needs to be configured in the CRON tab using SSH OR control panel. Link to comment Share on other sites More sharing options...
Guest Posted August 27, 2018 Share Posted August 27, 2018 It only works on 1.7 with the module on github Link to comment Share on other sites More sharing options...
satkauskas Posted October 8, 2018 Share Posted October 8, 2018 it works 1.7.4.2, with cpanel adding on server cronjobs with: curl -k "http://........." Link to comment Share on other sites More sharing options...
Darius1990 Posted March 21, 2019 Share Posted March 21, 2019 I have a strange behavior. CRON job works ONCE. And after that deactivate cron job and don't work any more. Maybe any clue what's wrong? Link to comment Share on other sites More sharing options...
mktm20111 Posted January 12, 2020 Share Posted January 12, 2020 Hi i have set my cron jobs in Cpanel but they don't work i'm under a linux hosting plan and i think the cron jobs need to be different for linux but i don't know how to do them If anyone could guide me step by step that would be great thank you Link to comment Share on other sites More sharing options...
DZRDUN Posted January 17, 2020 Share Posted January 17, 2020 On 4/12/2018 at 5:22 PM, shobhitverma said: Here is the solution which worked for me on two different Prestashop 1.6 and 1.7 which is hosted on different servers but both are using cpanel. Initially, It was not working for me too, but after doing some googling and trying some combination of setting, I came up with a working solution. 1. Go to module cronjobs in your shop back office. 2. select mode as Advanced 3. Save it 4. Now add a new task by clicking plus sign under "CRON TASKS" tab 5. Provide the details: 5.1 Task Description: ANY Thing 5.2 Target Link: URL which you want to be part of cron, but check this URL in a browser window whether it is working or not. 5.3 Task Frequency: must do bellow setting (This setting is not going to work) but should be set as mention below. Every Hour Every day of the month Every Month Every day of the week 5.4 Save Finally, It should look like 1.jpeg attached image. Now there are two ways to proceed further either using Cpanel or SSH By Cpanel 1. Open Cpanel 2. Goto Advanced Tab 3. Click on the cron job 4. Enter your mail and update it 5. Then goto bellow section "Add New Cron Job." 6. Select the setting from the drop-down "Common Setting" this is the setting which will decide at what time script will execute, It will automatically fill bellow some fields 7. But there is one filed is still empty Command, to fill filed do bellow steps 7.1 Go to the shop back office, Goto module cronjobs 7.2 Under Advanced option you will see the command, something like this 0 * * * * curl -k "https://www.abc.com/backoffice/index.php?controller=AdminCronJobs&token=b7ad52c1870c1f7a758c281dd92b333c" 7.3 From this command copy from curl to last 7.4 Past it here 8. Click on Add New Cron Job. Done, Now you will now receive mail when cron job gets executed with the result By SSH 1. Connect SSH 2. Type command "crontab -e" 3. It will open vim editor where you need to mention some code; You can find that code by below steps: 3.1 Go to the shop back office, Goto module cronjobs 3.2 Under Advanced option you will see the command, something like this 0 * * * * curl -k "https://www.abc.com/backoffice/index.php?controller=AdminCronJobs&token=b7ad52c1870c1f7a758c281dd92b333c" 3.3 now in the command change this part "0 * * * *" as per your requirement, This is setting which will tell at what frequency you want to execute cron jobs You can calculate it also very quickly by this link https://crontab.[spam-filter]/ 3.4 Now your command may look like this 0 0 * * * curl -k "https://www.abc.com/backoffice/index.php?controller=AdminCronJobs&token=b7ad52c1870c1f7a758c281dd92b333c" 3.5 Now final code MAILTO="[email protected]" 0 0 * * * curl -k "https://www.abc.com/backoffice/index.php?controller=AdminCronJobs&token=b7ad52c1870c1f7a758c281dd92b333c" 3.6 Past it here 3.7 Save file and Exit 4. Done, Now you will receive mail when the job gets executed. Good afternoon! Did according to yours. The crown is never executed. In letters comes the answer: / bin / sh: 1: curl: not found What could be wrong? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now