LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-29-2006, 09:03 AM   #1
user52
Member
 
Registered: Nov 2006
Posts: 41

Rep: Reputation: 15
crontab


hello sir...
i schedule my job on crontab but it is not running > why ?


my crontab like this.
05 * * * * /db/app/test.sh



here i have few question.
1.
if cronjob is fail where i see result... mean every cronjob send email. where i check.
2. i already check....

/usr/lib/ .... here no cron folder or not cron file..

actully i search cron.allow.... cron.deny...

plz. help....
 
Old 11-29-2006, 09:56 AM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
cron will call syslog to report stats of cron jobs. Where syslog puts the messages depends on your exact setup. For me, cron status log messages go in /var/log/syslog, but you might have a cron specific logfile in your /var/log directory.

Often, cron will send a local email to the root user with cron errors. You'll only see this if you have local mail delivery configured so you get mails for root.

The quick-and-dirty method for seeing error messages would be to change the crontab line to:
Code:
05 * * * * /db/app/test.sh > /tmp/mycronlog 2>&1
...and wait for the program to run again, then look in /tmp/mycronlog.

General hint about cron problems: it's almost always because of the environment settings in general, the PATH variable in particular. When cron launches a job, it does so with a very restricted environment, as defined in the /etc/crontab file.
 
Old 11-29-2006, 06:24 PM   #3
derxob
Member
 
Registered: Apr 2006
Location: Los Angeles, California
Distribution: Slackware, Ubuntu
Posts: 68

Rep: Reputation: 15
Make sure that the file you want executed has the correct "execute" permission.

chmod +x test.sh
 
Old 11-30-2006, 02:11 AM   #4
user52
Member
 
Registered: Nov 2006
Posts: 41

Original Poster
Rep: Reputation: 15
sir i give only like

chmod 755 test.sh it is right or wrong.
or i want to give
chmod +x test.sh

premission...

plz. sir help me...
 
Old 11-30-2006, 05:32 AM   #5
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Quote:
Originally Posted by user52
sir i give only like

chmod 755 test.sh it is right or wrong.
or i want to give
chmod +x test.sh

premission...

plz. sir help me...
They will both set the execute bit. Please read the chmod manual page to understand what each means.
 
Old 11-30-2006, 05:38 AM   #6
venki
Member
 
Registered: Sep 2006
Location: India
Distribution: suse10.2
Posts: 128

Rep: Reputation: 15
hi,

first u have to #/etc/filename.cron.
then 05 * * * * /db/app/test.sh
save it .
#crontab filename.cron

to check whether cronjob is running or not type crontab -l.

that's it!!
 
Old 11-30-2006, 05:40 AM   #7
user52
Member
 
Registered: Nov 2006
Posts: 41

Original Poster
Rep: Reputation: 15
hello sir thank for your reply

but #/etc/filename.cron.
sir which filename.cron...


crontab -l just show only content of file not status...


plz sir help me..
 
Old 12-08-2006, 01:18 AM   #8
venki
Member
 
Registered: Sep 2006
Location: India
Distribution: suse10.2
Posts: 128

Rep: Reputation: 15
u can give any filename...

/etc/backup.cron....this will create backup.cron file..

its very simple..
i too think this is hard ...but try u will get succeed
all the best
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
about crontab shipon_97 Linux - General 1 02-28-2006 06:22 AM
Crontab kalinchuk Linux - Networking 1 02-22-2006 10:59 AM
crontab ALF Linux - Software 4 12-18-2003 12:10 PM
system-wide crontab in /etc/crontab ner Linux - General 2 11-18-2003 01:35 PM
Crontab WiWa Linux - Software 1 10-06-2003 06:20 PM


All times are GMT -5. The time now is 09:39 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