.. include:: _include.rst .. highlight:: php .. _cronjob_ratings: ##################### Ratings refresh ##################### This cronjob processes the "Advanced Ratings Mode" queue. Therefore it only works in combination with activated :ref:`ratings_advanced_mode`. .. image:: _static/gifs/cron_ratings_default_c.gif :height: 1280px :width: 780px :scale: 100% :alt: ASA2 ratings cronjob Execute it like this: .. code:: cd /path-to-your-wp-installation/wp-content/plugins/amazon-simple-affiliate/scripts bash script.sh Asa2_Cron_Ratings .. _cronjob_ratings_setup: ******** Setup ******** It is recommended to execute the ratings refresh cronjob every three minutes. If there are no problems and you have a lot of products, you can increase the frequency to every minute. Replace [wp_path] with the local server path of your WordPress installation. .. code:: 0/3 * * * * /[wp_path]/wp-content/plugins/amazon-simple-affiliate/scripts/script.sh Asa2_Cron_Ratings To learn more about cronjobs, see :ref:`cronjobs_intro`. .. _cronjob_ratings_options: ******* Options ******* pause ~~~~~~~~ Can be used to define a pause in seconds between each processed rating. Can be set globally for all executions with the option :ref:`option_ratings_refresh_cronjob_pause`. .. image:: _static/gifs/cron_ratings_option_pause_c.gif :height: 1280px :width: 780px :scale: 100% :alt: ASA2 ratings cronjob with pause option .. code:: bash // to set a pause of 2 seconds: bash script.sh Asa2_Cron_Ratings --pause=2 php ~~~ With the ``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 .. code:: bash script.sh Asa2_Module_Repo_Cron_Refresh --limit=10 --php=php74 quantity ~~~~~~~~ The ``quantity`` option can be used to set the quantity of products to be processed. Can be set globally for all executions with the option :ref:`option_ratings_refresh_cronjob_items`. .. image:: _static/gifs/cron_ratings_option_quantity_c.gif :height: 1280px :width: 780px :scale: 100% :alt: ASA2 ratings cronjob with quantity option :: // to process 5 products in a cronjob run: bash script.sh Asa2_Cron_Ratings --quantity=5 verbose ~~~~~~~~ Use the ``verbose`` option to get more information on the console. .. code:: bash script.sh Asa2_Cron_Ratings --verbose