Scheduling Tasks with cron and at in Linux


 Introduction

Task scheduling allows administrators to automate repetitive jobs. Linux provides cron for recurring tasks and at for one-time jobs.


Step 1: Edit Crontab


crontab -e


➡️ Example:


0 2 * * * /path/to/script.sh


Runs daily at 2 AM.


Step 2: View Scheduled Jobs


crontab -l


Step 3: One-Time Jobs with at


at 10:00


Type the command, then press Ctrl+D.


Step 4: List at Jobs


atq


Step 5: Remove an at Job


atrm job_number


Conclusion

Using cron and at, you can automate tasks and save time in Linux administration.

Comments