• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Cron Jobs for WP All Import

webarius

New Pleskian
Server operating system version
Ubuntu 20.04.5 LTS
Plesk version and microupdate number
Plesk Obsidian v18.0.48_build1800221104.03 os_Ubuntu 20.04
Hi there! I am trying to run two cron jobs one as a trigger and one as execution according to the following article.
I have managed to run it with whm but with plesk I cannot!
I have tried to run it as a command and also as php script but it fails every single time.
the two cron jobs are
and

I've seen the other posts cocerning cron jobs but couldn't make anything out of them.
Can anyone help me?
 
The cronjob "command" as you display it is merely opening a specific URL. In that case won't the "Request URL" option in setting up your task not do the job?

1670853725705.png

What is the error you are getting when fetching the URL?
 
Hi there, Based on the updated documentation of WPAllImport there should be a random number at the end of the URL.

For example the following command is given:
curl "http://your-website.com/wp-load.php...port_id=[YOUR_IMPORT_ID]&action=trigger&rand="$RANDOM
The documentation mentions:
"As seen in those examples, we use a $RANDOM parameter as a cache-busting technique. This is particularly handy in servers where heavy caching doesn't allow the cron jobs to function correctly."
In our case simple fetch url functionality does not work as expected, since the responses are cached and the exports so not finish successfully.


How can we set up a cron job that uses $RANDOM variable? We have contacted our hosting provider and they said that this is not possible.
 
Back
Top