LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-25-2006, 08:56 AM   #1
smart_sagittari
LQ Newbie
 
Registered: Apr 2005
Posts: 26

Rep: Reputation: 16
How does cron daemon work?


I am working on building a scheduler which runs tasks at specified times. In this regard, I felt it would be good to know how the cron daemon works. I Googled, but didnt really get much insight into what actually happens. Can I get some directions as to where I can get information on the same?
 
Old 01-25-2006, 10:20 AM   #2
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
Ermmm, the cron deamon IS a scheduler which runs tasks at specific times. Why would you want to build a new one?
 
Old 01-25-2006, 12:06 PM   #3
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
could you not check out the source of crond or at
 
Old 01-26-2006, 05:22 AM   #4
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: Mint (Desktop), Debian (Server)
Posts: 891

Rep: Reputation: 184Reputation: 184
Quote:
Originally Posted by xhi
notice... the majority of this post is opinion and hear_say, which is based primarily on bias and prejudice.
Like your tagline
 
Old 01-26-2006, 05:48 AM   #5
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
When cron is started or made to reread it's config, it examines all the config files, parses them and
stores this info in memory.
In a loop that runs every minute (==the finest time granule allowed), it checks if any jobs need to run
and if there are, it runs them (using a special environment setting and running as the user who submitted the job).

But, I agree with baldy that you should stick with cron/at if you can. There is no need to make your own.
If you do have a system without a scheduler/cron, you may consider building it from it source.
 
Old 01-26-2006, 08:40 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740Reputation: 740
If I understand correctly, cron is one of many "daemons" that run in background to keep the system functioning. All of these have the common feature that they continuously check **something** to see if an action is required. An obvious example is the daemon that watches for keyboard input in a terminal.

cron simply watches the clock and checks against the instructions in crontab to see what needs to be run for any given time.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can the output of cron daemon be sent via other smtp hamish Linux - Software 0 09-02-2005 08:28 AM
script automatically add entry in cron daemon? Thinking Linux - General 1 03-30-2005 05:27 AM
I can't get my vsftp daemon to work r_squared Linux - Networking 4 12-13-2004 05:38 PM
Cron Daemon error? Help please plisken Linux - General 0 08-27-2003 05:57 PM
[SuSE] 'Netdate': Cron Daemon Error DavidMD Linux - Distributions 6 06-18-2003 04:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration