LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 07-09-2009, 11:09 PM   #1
kwidya
LQ Newbie
 
Registered: Jul 2009
Posts: 4

Rep: Reputation: 0
Unable to Start Cron Job


Hi All,

I am newbie in debian, I faced problem with cron job as well. I tried to set my cron in cron file like this in debian (just installed)

30 10 * * * sh /home/user1/test.sh

And I activated the cron by using crontab cron.

but that cron was not run at 10:30 AM. Any idea, why my cron could not run?? Do I miss to configure some setting related to cron in debian??
FYI under /etc path the file related to cron are
anacrontab
crontab
cron.hourly
cron.weekly
cron.d
cron.monthly
cron.daily


Thanks in advance.
-ketut-
 
Old 07-09-2009, 11:25 PM   #2
abi0909
Member
 
Registered: Jul 2009
Distribution: Ubuntu, RedHat, VMWare, CentOS, Windows, Android, Mac
Posts: 55

Rep: Reputation: 18
@ above:

Any messages in your message log ? (/var/log/messages) for this 10.30 AM
 
Old 07-09-2009, 11:32 PM   #3
kwidya
LQ Newbie
 
Registered: Jul 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by abi0909 View Post
@ above:

Any messages in your message log ? (/var/log/messages) for this 10.30 AM
There is no message in /var/log/messages @10:30 AM.
 
Old 07-09-2009, 11:53 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,281

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
There should be an email in either your email acct or root's.
That's where cron puts any errors etc. You'll need to use a cli mail client eg
mailx.

also, cron has a very minimal env, so you need to use the absolute full path to all cmds & files referenced.
You'd prob be better off putting the correct shebang line eg
#!/bin/sh

at the top of the script file and don't bother putting 'sh' in cron cmd.
iirc, the cron log is usually /var/log/cron or similar. Look under the /var tree for 'cron'
 
Old 07-10-2009, 07:07 AM   #5
kwidya
LQ Newbie
 
Registered: Jul 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for the guidance. It's already working after restarted my system as well.
 
  


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
How do I start a cron job that starts on the 22nd of the month, mrtg. GlennsPref Mandriva 8 02-06-2009 05:59 PM
Cannot stop/start services in cron job Sanford Stein Linux - Newbie 4 08-11-2008 04:41 PM
Cron Job: Start it Only once on specified time jCash Linux - Newbie 2 12-07-2007 07:35 PM
unable to run cron job fahad26 Linux - General 3 06-30-2005 01:51 AM


All times are GMT -5. The time now is 05:55 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration