Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-05-2007, 02:18 PM   #1
LQ Newbie
Registered: Jun 2007
Posts: 28

Rep: Reputation: 15
Command to check cronjob service

Hi ,

I want to know which command we have to use to check wether the cronjob service is running or not.I am getting error file not found when running a cron job.What could be the problem

Old 06-05-2007, 02:52 PM   #2
Senior Member
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
The command:
ps -aux |grep crond
should tell you if cron is running, but that doesn't sound like your problem.

It sounds as if the cron entry is pointing to a command that doesn't exist, or the command is trying to access a file that doesn't exist.

Hope this helps.
Old 06-05-2007, 04:48 PM   #3
Registered: Sep 2004
Location: Stockholm, Sweden
Distribution: Ubuntu, RedHat, SuSe, Debian, Slax
Posts: 102

Rep: Reputation: 15
You can also use the command
/etc/init.d/cron restart
to make sure it is running (name and location may differ for You).
There could be a lot of things...
What does Your cronjob/crontab look like?
Do You run it through the predefined script locations in /etc/cron.* or schedule it Yourself with crontab?
As what user?
Is it executable?
Does the crontab use the full filename of Your script?
Grep for CRON in var/log/messages, /var/log/syslog or ANY logfile there.
Check for working directory, check for "shebang", check for path; if You run a script start it with #!/bin/bash to have a known shell, use ' . /etc/profile ' to get a known environment, use poor mans debugging! ie, echo status to an absolute filename.

It could help if You told us more!

Last edited by lakris; 06-05-2007 at 04:51 PM.


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
nagios check service noir911 Linux - Networking 5 07-24-2006 05:12 PM
Cronjob problem. Unknown Command dragunu Linux - Newbie 1 05-16-2006 12:47 PM
way to check and see if a service is running nephish Linux - Software 10 02-11-2006 03:36 PM
Service check script assafde Linux - Networking 1 02-02-2006 06:46 PM
Service check script MPowers Linux - Networking 1 01-24-2006 12:42 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:13 AM.

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