cron job not working
-
hello, I am trying to setup a cron job but failed.
My condition:
I am using wordpress to build my site. I am trying to import articles daily regularly by cron. The work flow is like this:
1. upload csv to /public_html/wp-content/uploads/wpallimport/files/
2. setup the import rules
3. first cron to trigger the import
4. second cron to process the import and repeat every two minutesGuide I follow: https://www.wpallimport.com/documentation/recurring/cron/
However, before setting up the cron. I have to make sure the link works.
For the first time trigger link, it shows {#622 Cron job triggered.”}
For the first time process link, it shows {#622 completed.”}Unforturnately, the links only work at the first time. It seems when you visit the second time, it loads the cached result (I guess) and does not really send out commands to process.
To test the problem:
1. I prepared a test csv file in /wp-content/uploads/wpallimport/files/123-123.csv
Go WordPress dashboard > All import > Manage import > find ID 662 > Scheduling Options > Under Manual Scheduling > find the Trigger URL and Processing URL2. To initiate the import: wp-load.php?import_key=XXXXX&import_id=622&action=trigger
I see {“status”:200,”message”:”#622 Cron job triggered.”}3. To process the import: wp-load.php?import_key=xxxxxx&import_id=622&action=processing
4. Then I changed the text(post title) in the test csv file (123-123.csv) to simulate a update.
5. Then initiate the import again and it shows {“status”:200,”message”:”#622 Cron job triggered.”}
6. Then process the import again (The result show instantly and that’s why I suspect its a cached result. The message shows “Import #622 is not triggered. Request skipped.”)
If success, I should see the post title changed.
I have installed the plugin W3 total cache. But I tried both enable and disabled it during the test and get the same problem. Thus, I don’t know if there is other cache like server cache or browser cache leading to this problem.
Please test for me. Thank you
- The topic ‘cron job not working’ is closed to new replies.