How to set Cronjob for Laravel into Hostinger ?

vCard SaaS - Business Card Builder SaaS - Laravel VCard Saas - NFC Card - With Mobile App

article image
Vishal Ribdiya

Setting up a cron job for a Laravel application on Hostinger involves a few straightforward steps. Cron jobs are essential for automating scheduled tasks like sending emails, cleaning up databases, or running maintenance scripts. Here’s how to configure them on Hostinger:

Step 1: Access Your Hosting Account

1. Log in to your Hostinger account.

2. Navigate to the hPanel dashboard.

Step 2: Open the Cron Jobs Section

1. In the hPanel, scroll down to the **Advanced** section.

2. Click on **Cron Jobs**.

Step 3: Add a New Cron Job

1. Click on the **Add Cron Job** button.

Add: "public_html/artisan schedule: run"

Step 5: Save the Cron Job

1. Click the **Save** button to create your cron job.

By following these steps, you can effectively automate tasks in your Laravel application using cron jobs on Hostinger. This will help maintain your application and keep it running smoothly.