---
title: "How to Setup Cron Job Magento 2: Magento 2.4 updated"
url: "https://magecomp.com/blog/setup-cron-job-magento-2-4/"
date: "2021-09-25T11:46:32+00:00"
modified: "2021-09-25T11:46:32+00:00"
author:
  name: "Dhiren Vasoya"
  url: "https://magecomp.com/"
categories:
  - "Magento Tutorials"
word_count: 458
reading_time: "3 min read"
summary: "Hello, Magento Folks!"
description: "The Magento crontab is the configuration used to run Magento cron jobs. learn more on The Magento crontab is the configuration used to run Magento cron jobs...."
keywords: "Magento Tutorials"
language: "en"
schema_type: "Article"
related_posts:
  - title: "How to Configure Credit Memo Comments in Magento 2? &#8211; Finale Episode"
    url: "https://magecomp.com/blog/configure-credit-memo-comments-magento-2/"
  - title: "How to Show/Hide Order ID in Invoice, Shipment &#038; Credit Memo PDF of Magento 2"
    url: "https://magecomp.com/blog/show-hide-order-id-in-invoice-shipment-credit-memo-pdf-of-magento-2/"
  - title: "How to Add Filterable Product Attribute in Products in Category in Magento 2?"
    url: "https://magecomp.com/blog/add-filterable-product-attribute-in-products-in-category-in-magento-2/"
---

# How to Setup Cron Job Magento 2: Magento 2.4 updated

_Published: September 25, 2021_  
_Author: Dhiren Vasoya_  

![How to Setup Cron Job Magento 2 - Magento 2.4 updated](https://magecomp.com/blog/wp-content/uploads/2021/09/How-to-Setup-Cron-Job-Magento-2-Magento-2.4-updated-1024x512.webp)

**Hello, Magento Folks!**

In order to spontaneously execute several operations in your Magento 2 site, setting up cron jobs in Magento 2 is required as it schedules tasks in line. These operations can be automatically performed through the script written in the configuration.
Cron Job – one of the best ways to periodically manage your programs automatically and properly rather than doing it manually. Just ensure setting the base URL correctly so that when the cron is running, it executes operations just perfectly.
## Setup Cron Job from Magento 2 Admin Panel
- Log in to the Magento 2 backend panel. From the left panel, go to **Stores > Settings > Configuration**.- Navigate to **Advanced > System** and expand the **Cron (Scheduled Tasks)** section and perform further on the **Cron configuration options for group: index** and **Cron configuration options for group: default** sections.
[![cron configuration magento 2](https://magecomp.com/blog/wp-content/uploads/2021/09/cron-configuration-magento-2.png)](https://magecomp.com/blog/wp-content/uploads/2021/09/cron-configuration-magento-2.png)

Set the values of **Cron configuration options for group: index** as the following image:
[![Cron configuration options for group index](https://magecomp.com/blog/wp-content/uploads/2021/09/Cron-configuration-options-for-group-index.png)](https://magecomp.com/blog/wp-content/uploads/2021/09/Cron-configuration-options-for-group-index.png)

Set the values of **Cron configuration options for group: default** as the following image:
[![Cron configuration options for group default](https://magecomp.com/blog/wp-content/uploads/2021/09/Cron-configuration-options-for-group-default.png)](https://magecomp.com/blog/wp-content/uploads/2021/09/Cron-configuration-options-for-group-default.png)

- On finishing, **Save Config**.
## Setup Magento 2 Cron job by command line
**Steps to Create the crontab :**

First, Open the Terminal and log in with the root user. After that go to Magento Root Path then run the below command:
```
bin/magento cron:install
```

**Output:**

[![cron install by command line](https://magecomp.com/blog/wp-content/uploads/2021/09/cron-install-by-command-line.png)](https://magecomp.com/blog/wp-content/uploads/2021/09/cron-install-by-command-line.png)

Crontab is created and saved.
```
bin/magento cron:install --force
```

Crontab is created and saved
**NOTE:** Use **–force** to rewrite an existing Magento crontab.
- **magento** **cron:install** does not rewrite an existing crontab inside **#~ MAGENTO START** and **#~ MAGENTO END** comments in crontab.- **magento cron:install –force** does not affect any cron jobs outside Magento comments.
**To check crontab List, run the below command:**

```
crontab -l
```

**Output:**

[![check cron tab list](https://magecomp.com/blog/wp-content/uploads/2021/09/check-cron-tab-list.png)](https://magecomp.com/blog/wp-content/uploads/2021/09/check-cron-tab-list.png)

**Steps to Run cron from the command line**

Log in with the root user in the terminal. Go to Magento Root Path After running the below command:
```
bin/magento cron:run
```

**Output:**

[![cron run magento 2](https://magecomp.com/blog/wp-content/uploads/2021/09/cron-run-magento-2.png)](https://magecomp.com/blog/wp-content/uploads/2021/09/cron-run-magento-2.png)

Ran jobs by schedule.
where **–group** defines the cron group to run (eliminate this alternative if you want to run cron for all groups)
```
bin/magento cron:run [--group="<cron group name>"]
```

To run the indexing cron job, enter:
```
bin/magento cron:run --group index
```

To run the default cron job, enter:
```
bin/magento cron:run --group default
```

**Steps to Remove the Magento crontab:**

First Open Terminal and login with the root user and go to Magento Root Path After running the below command :
```
bin/magento cron:remove
```

**Output:**

[![remove cron tab magento 2](https://magecomp.com/blog/wp-content/uploads/2021/09/remove-cron-tab-magento-2.png)](https://magecomp.com/blog/wp-content/uploads/2021/09/remove-cron-tab-magento-2.png)

Magento cron tasks have been removed
## Bottom Line
We hope that setting up cron through the Magento backend panel and the command line was helpful to you. Still, if you meet any conflicts, you can catch us [**here**](https://magecomp.com/support/). we would be pleased to assist you.
**Read the similar blog –** [**How to Set Up Cron Jobs in Magento 2**](https://magecomp.com/blog/set-up-cron-jobs-in-magento-2/)

**Happy Reading!**


---

_View the original post at: [https://magecomp.com/blog/setup-cron-job-magento-2-4/](https://magecomp.com/blog/setup-cron-job-magento-2-4/)_  
_Served as markdown by [Third Audience](https://github.com/third-audience) v3.5.3_  
_Generated: 2026-09-11 10:16:30 UTC_  
