Crontab command allows you to schedule the execution of tasks on a regular basis.
For instance, you can schedule the execution of shell scripts on a flexible schedule instead of manually invoking those shell scripts.
How Crontab works
Here are the points to keep in mind:
- Crontab tasks do not inherit the environment of a specific user, which means that you must ensure that all required environment variables are set properly (such as invoking a script that contains those variables).
- You can schedule a task to run based on the following:
an hourly, daily, or weekly basis a specific day of the month a specific month or year
Browse
The following command displays the currently scheduled jobs for your machine:
$ sudo crontab
In other ways, you can use crontab -l to list all the jobs present.
$ sudo crontab -l
Edit
You need to be either the root user or use sudo in order to modify crontab (in the /usr/bin directory) with the following command:
$ sudo crontab -e
Replace
The following command replaces the current set of jobs with the jobs in the file crontab.new:
$ crontab -r < crontab.new
More Srinimf
-
From Laptop to Cloud: Deploy Your First Production DB Using Amazon RDS
Learn how to move from a local database to a production-ready cloud setup using Amazon RDS. A beginner-friendly step-by-step guide covering setup, backups, scaling, and best practices.
-
The End-to-End AI Stack – A Real Guide for Developers to Code, Create, and Execute
Learn how modern AI tools like ChatGPT, NotebookLM, and Antigravity fit into the AI stack. Discover the 5-layer AI capability model and how to choose the right AI tools for thinking, creating, building, and automat
-
FAANG-Style SQL Interview Traps (And How to Avoid Them)
SQL interviews at FAANG (Facebook/Meta, Amazon, Apple, Netflix, Google) are not about syntax. They are designed to test logical thinking, edge cases, execution order, and data correctness at scale. Many strong candidates fail—not because they don’t know SQL, but because they fall into subtle traps. In this blog, we’ll walk through real FAANG-style SQL traps,…






