Documentation

Installation
Plugin Configuration

NEW POSTS

How to Add Cron Job

08.02.2022 Important Update: If you are using version 1.4.90 and above, please make sure to change your cronjob path as follow:

* * * * * php /Applications/MAMP/htdocs/wordpress/index.php -- wpaicg_cron=yes

 To use the bulk feature of our plugin, you’ll need to set up a cron job on your server. Cron is a built-in Linux utility that runs processes on your system at a scheduled time. By setting up a cron job, you can automate tasks such as running the bulk feature of our plugin at a specific time or at regular intervals.

Here are the steps for setting up a cron job for different environments:

For a Linux server:

    • Open a terminal window and enter the following command: crontab -e

SCR 20230106 pf

    • This will open a text editor where you can enter the cron job configuration.
    • Now go to your WordPress admin panel and navigate to Bulk Content Writer page. You will see a message says “The Cron Job command for your website”..

SCR 20230208 5bk

    • Copy the command that starts with * * * * * and paste it at the bottom of the file in the text editor.
    • This will run the bulk feature of the plugin every minute. You can customize the schedule by changing the timing values (e.g., 0 */6 * * * will run the feature every 6 hours).
    • Note: Be sure to copy the command from your plugin’s Bulk Content Writer page, and not the example provided in these instructions.
    • Save and close the file. The cron job will be automatically added.
    • Now wait couple of minutes and the refresh your page again. You will see a message says “Great! It looks like your Cron Job is running properly. You should now be able to use the Bulk Editor.” It means everything went well and you can use the bulk editor.

For a cPanel hosting account:

  • Log in to your cPanel account.
  • In the “Advanced” section, click on the “Cron Jobs” icon.
  • Under “Add New Cron Job,” select the timing for the cron job for every minute, hour, day, month and weekday as shown below.

SCR 20230106 186

  • For the Command field, you need to copy the command from your plugin’s Bulk Content Writer page.

    For example if your command is:

    * * * * * php /var/www/html/index.php -- wpaicg_cron=yes 

    then you need to copy only

    php /var/www/html/index.php -- wpaicg_cron=yes and paste it in Command field.

    Save and close the file.

    The cron job will be automatically added.

    Now wait couple of minutes and the refresh your page again.

    You will see a message says “Great! It looks like your Cron Job is running properly. You should now be able to use the Bulk Editor.” 

    It means everything went well and you can use the bulk editor.

    For a Plesk hosting account, you can follow the same format as shown in below screenshot.

    SCR 20230327 tehz

    Please note: some cPanel users have to put full path of php.. For example: /usr/bin/php ..

    If your cron job stops working, you can force refresh it by clicking the “Force Refresh” button as shown below.

    SCR 20230111 rjn

    Reminder: You have the option to execute a cronjob directly from your browser. Simply enter the following URL in your browser’s address bar:

    https://your_url.com/wp-admin/index.php?wpaicg_cron=yes

    Make sure to replace ‘your_url’ with your actual website URL. Keep in mind that this will only initiate the cronjob once. To run it in the background, you’ll need to set up an appropriate cronjob.

    Additional note: A server-level cronjob is required. Cronjob plugins will not suffice, and WordPress managed websites do not support server-level cronjobs.

10 Responses

  1. Why do I have to run a cron job every minute? I don’t want to index comments (we don’t even allow comments on our website) and we only publish a few articles a week. Why can’t I simply run the indexing process manually after I publish an article?

    1. You dont need to run it every minute. You can set any interval you want. If you are asking about Indexing for Embeddings, it is automatic, once a post is published it will be indexed based on your interval.

  2. how to set this if you are using cloudflare? with cloudflare its not working and after adding it in hosting. i still got the same red line…

  3. Hello,
    I am tring to set up the cron, but my hosting does not allow to add a cron job with such a frequency, will that work if I set there every 15 minutes frequency?

Leave a Reply

Your email address will not be published. Required fields are marked *

  • Please note that your conversations will be recorded.

  • Lisa: Hello :), my name is Lisa and I am here to help you. You can ask me anything about our plugin.

Lisa is getting an answer.. ...