How to Setup a 3 Minute Cron Job in Hostinger

Setting up a cron job in Hostinger to run every 3 minutes involves a few steps. Here is a step-by-step guide to help you configure it:

  1. Log in to your Hostinger account:
    • Go to the Hostinger website and log in with your credentials.
  2. Access the hPanel:
    • Once logged in, navigate to the hPanel (Hostinger’s custom control panel).
  3. Navigate to Cron Jobs:
    • In the hPanel, find the “Advanced” section and click on “Cron Jobs”.
  4. Create a New Cron Job:
    • In the Cron Jobs interface, you will see options to add a new cron job.
  5. Set the Schedule:
    • You will need to specify the timing for the cron job. For a cron job to run every 3 minutes, use the following configuration:
    markdownCopy code*/3 * * * *
    • Breakdown of the cron job schedule:
      • */3 – Every 3 minutes
      • * – Every hour
      • * – Every day of the month
      • * – Every month
      • * – Every day of the week
  6. Add the Command:
    • In the “Command” field, enter the command you want to execute. This could be a script or a specific command that needs to run every 3 minutes. For example, if you have a PHP script to execute, you might enter something like:
    bashCopy code/usr/bin/php /home/username/public_html/script.php
    • Make sure to replace /home/username/public_html/script.php with the actual path to your script.
  7. Save the Cron Job:
    • After entering the schedule and command, click the “Save” or “Add” button to create the cron job.
  8. Verify the Cron Job:
    • Once saved, check the list of cron jobs to ensure your new cron job is listed and correctly configured.

Here is an example of how the cron job configuration might look in the hPanel:

sqlCopy codeMinute     Hour     Day     Month     Weekday     Command
*/3        *        *       *         *           /usr/bin/php /home/username/public_html/script.php

Following these steps will set up a cron job in Hostinger to run every 3 minutes. Make sure your script is executable and the path is correct to avoid any issues.

Similar Posts

Leave a Reply

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