If you use “Since Last Run” – switch “Filter orders by” to “Modification Date”, the job records timestamp.
For example, you set job to export “Processing” orders each 5 minutes and use “Order date” .
1. If you see empty reply, mark checkbox “Enable debug output” in section “Misc Settings” and press button “Test” again.
2. Visit list of jobs and check if columns “Last run” and “Next run” show correct time. If you haven’t added WP cron to system cron – follow this article.
3. Set frequent schedule for the job (for example, each minute). Mark checkbox “Enable debug output” in section “Misc Settings” and press “Save Settings”. Visit tab “Settings” – “Jobs”, click on the url and review output. If you see “All jobs completed” – wait 1 min and refresh the page.
4. Edit job, mark checkbox “Log results” (in section “Schedule”), save job and wait till job run.
Open job again, click link “View Logs” (next to checkbox) and select “woocommerce-order-export-….” in dropdown.
Check if you have selected the “Since last run” option. You will only get new orders in this case, so you must create a fake order to get the email.
Open a job (status change or scheduled) and mark checkbox “Log results”. Wait till jobs run. Open the job again, click link “View results” and select “woocommerce-order-export-xxxxx” in dropdown.
How to run a specific scheduled task directly from a URL?
1. Edit job and set empty schedule.
You must look at the url and remember id!
2. You should open tab “Settings”, open “Jobs”, click “Generate new key” and click “Save”.
You should open tab “Settings”, open “Jobs” (again!) and copy key only
3. Modify this url.
http://{site.com}/wp-admin/admin-ajax.php?action=order_exporter_run&method=run_one_scheduled_job&schedule={job_id}&key={key}
{site.com} – is your website url
{job_id} – you get this ID at step #1
{key} – you get this key at step #3
If you use HTTPS, replace http with https too!
Final result must looks like
http://test.com//wp-admin/admin-ajax.php?action=order_exporter_run&method=run_one_scheduled_job&schedule=2&key=xyza
4. Test it, open this url in browser, you should get message
Scheduled job #XXX. Result: …..
You can use this url in external scripts OR call it (for example) via curl/wget.