jeudi 8 juin 2017

How to setup a Cron Job on Ubuntu?

  Aucun commentaire
Hey, Wasuuuuuuup 😝

Today we will learn how to setup / start a Cron Job on Ubuntu.

What is a cron job ?

The software utility Cron is a time-based job scheduler in Unix-like computer operating systems. People who set up and maintain software environments use cron to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals. It typically automates system maintenance or administration—though its general-purpose nature makes it useful for things like downloading files from the Internet and downloading email at regular intervals.[1] The origin of the name cron is from the Greek word for time, χρόνος (chronos).[2] (Ken Thompson, author of cron, has confirmed this in a private communication with Brian Kernighan.)  [By Wikipedia - Read more ...]
We understand now that a cron is a task executed each and every [time interval].

 How to setup my own cron job?

To setup your own cron, you should run the following command :
crontab -e
Then add your task line. Let's take as example this line:
* * * * * /path/to/command 
The task above executes a command each and every minute...

Cron jobs time interval can be customized, read more ...

Hope this article helps you to setup your first cron 😉

Aucun commentaire :

Enregistrer un commentaire