Keywords Preload Cronjob¶
To learn more about cronjobs in general, check out the Introduction chapter.
To learn more about setting up and using ASA2’s cronjobs, see the dedicated Cronjob Setup chapter.
The internal name of this cornjob is
Therefore, use it with the Server-side execution like this:
bash script.sh Asa2_Module_Keywords_Cron_Preload --limit=3
$cronWrapper = new \Asa2\Cron\Wrapper('Asa2_Module_Keywords_Cron_Preload'); $cronWrapper->setOptions([ 'limit' => 3, ]); $cronWrapper->execute();
The REST API endpoint name of this cronjob is
Check Cron REST API for more details about running ASA2’s cronjobs via URL.
The recommended frequency of execution depends on the Preload threshold setting. By default this is every 15 minutes which means that this cronjob may refresh the keywords results 15 minutes before the cache expires. Therefore, in this case, the cronjob should also be executed at least every 15 minutes.
Limits the amount of keyword shortcodes to be updated. Default is no limit
bash script.sh Asa2_Module_Keywords_Cron_Preload --limit=10
Can be used to define a pause in seconds between each process. Can be set globally for all executions with the option options_advanced_cronjob_request_pause.
// to set a pause of 2 seconds: bash script.sh Asa2_Module_Keywords_Cron_Preload --pause=2
php option, you can tell the ASA2 cronjob what PHP executable it should use to execute the command. With some webhosters the standard command “php” executes an outdated version and there is a special command for each version, e.g. “php73” or “php74”.
Please check which PHP version is required for the use of ASA2 here: https://bit.ly/asa2-php-version
bash script.sh Asa2_Module_Repo_Cron_Refresh --limit=10 --php=php74