What Are Cronjobs? Explain Cron Jobs
RegisterLogin
What Are Cronjobs? Explain Cron Jobs
Post Description: the other day, i was wondering what cron jobs were. so if you want to know what a cronjob is a deamon which means it runs continuely, lookfor for events taht cause it to spring into action
Tags: what, are, cronjobs?, explain, cron, jobs
This Post Was Posted On Feb 27, 2010 By Downther #3175
Post Description: the other day, i was wondering what cron jobs were. so if you want to know what a cronjob is a deamon which means it runs continuely, lookfor for events taht cause it to spring into action
Tags: what, are, cronjobs?, explain, cron, jobs
This Post Was Posted On Feb 27, 2010 By Downther #3175
What Are Cronjobs? Explain Cron Jobs by Downther
for example, you can use cron jobs to run scripts by the minute, hourly, daily, weekly, monthly, yearly - you get the picture...
unlike most daemons, which are network servers, cron responds to temporal events. specifically, it wakes up once a minute, examines configuration files in the /var/spool/cron and /etc/fron.d directories and the /etc/crontab file and then executes the command contained in these configuration files if the time matches the time listed in the files.
cool!!!
one example you can use cron jobs is to make daily backups of your server on a daily basis
# cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/
# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
if you want to list all of your current schedules cron jobs send this command:
crontab -l
NOTE: you must be logged is as superuser (root)
©2011 Webune Forums - Sun Dec 18, 2011 11:11 pm
Powered by: Webune Forums V3
Powered by: Webune Forums V3