Cron is a time-based job scheduler in Unix-like computer operating systems. Cron enables users to schedule jobs (commands or shell scripts) to run periodically at certain times or dates. It is commonly used to automate system maintenance or administration, though its general-purpose nature means that it can be used for other purposes, such as connecting to the Internet and downloading email.
In the terminal we can search for its commands, just write this in your terminal: man cron.
Cron is a service or daemon that needs to be started only once, usually it starts with the operating system boot. The cron daemon is called crond. We can prove that the cron daemon is started at the boot, typing this in the terminal:
#> /etc/rc.d/init.d/crond status
#> /etc/init.d/crond status //Use either of this two lines depending on the distro
crond (pid 507) is running...
Or use this line if you have the command “service” installed:
#> service crond status
crond (pid 507) is running...
You can also check it through the ps command:
# ps -ef | grep crond
If for some reason, cron isn’t not working:
#> /etc/rc.d/init.d/crond start
Starting crond: [ OK ]
If the service wasn’t configured to boot from the start, would be sufficient to add it with the chkconfig command:
#> chkconfig --level 35 crond on
What Is Crontab?
A crontab file contains instructions to the cron daemon of the general form: "run this command at this time on this date"
Each user can create his own crontab.
On Wikipedia you can find how to make a crontab, below we provide the link
http://es.wikipedia.org/wiki/Cron_(Unix)
Also here is an example of a crontab:
http://unixhelp.ed.ac.uk/CGI/man-cgi?crontab+5
Sources:
http://es.wikipedia.org/wiki/Cron_(Unix)
http://unixhelp.ed.ac.uk/CGI/man-cgi?crontab+5
Esta es la última entrada que contabilizo como puntos extra en N3T. No intenten sacar más ;) +1
ReplyDelete