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:
- Log in to your Hostinger account:
- Go to the Hostinger website and log in with your credentials.
- Access the hPanel:
- Once logged in, navigate to the hPanel (Hostinger’s custom control panel).
- Navigate to Cron Jobs:
- In the hPanel, find the “Advanced” section and click on “Cron Jobs”.
- Create a New Cron Job:
- In the Cron Jobs interface, you will see options to add a new cron job.
- 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:
*/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
- 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:
/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.
- Save the Cron Job:
- After entering the schedule and command, click the “Save” or “Add” button to create the cron job.
- 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.