LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-06-2006, 03:16 PM   #1
somsahi
Member
 
Registered: Aug 2006
Posts: 44

Rep: Reputation: 15
cron is not working


I have a script audit.sh in home/wasadmin/jar whose contents are below

#!/bin/sh
/usr/java/j2sdk1.4.2_12/jre1.4.2.12/bin/java -jar /home/wasadmin/jar/AAuditManger.jar
After creating this file i used this command

"chmod +x /home/wasdamin/jar/audit.sh" (use chmod +x audit.sh as u r in curent directory")

Now for cron job
script in home/wasadmin/jar as audit.ct

0-59/3 * * * * home/wasadmin/jar/audit.sh

to add the cron job used
"crontab /home/wasadmin/jar/audit.ct"

but nothing is haapening .any idea.
all three audit.sh ,audit.ct and jar file in same direcotry
 
Old 10-06-2006, 03:23 PM   #2
ygloo
Member
 
Registered: Aug 2006
Distribution: slack
Posts: 323

Rep: Reputation: 30
i put files in one of /etc/cron.* dirs.... depends when u wan to start script
 
Old 10-06-2006, 03:27 PM   #3
somsahi
Member
 
Registered: Aug 2006
Posts: 44

Original Poster
Rep: Reputation: 15
ok i try that and update this thread
 
Old 10-06-2006, 03:40 PM   #4
somsahi
Member
 
Registered: Aug 2006
Posts: 44

Original Poster
Rep: Reputation: 15
i tried to open file audit.ct in folder mentioned by you but after writing the line whan i try to save it by zz error cannot OPEN FILE FOR WRITING
 
Old 10-06-2006, 03:54 PM   #5
somsahi
Member
 
Registered: Aug 2006
Posts: 44

Original Poster
Rep: Reputation: 15
i think i have no permission for this folder any how is it possible that when in same directory this cron can be run
 
Old 10-06-2006, 04:17 PM   #6
ygloo
Member
 
Registered: Aug 2006
Distribution: slack
Posts: 323

Rep: Reputation: 30
folder permissions should look like this:

drwxr-xr-x 2 root root 4096 2005-04-13 08:31 /etc/cron.daily
 
Old 10-06-2006, 04:20 PM   #7
somsahi
Member
 
Registered: Aug 2006
Posts: 44

Original Poster
Rep: Reputation: 15
but basic question remain same does it matter if i keep all file in same folder
 
Old 10-06-2006, 04:23 PM   #8
somsahi
Member
 
Registered: Aug 2006
Posts: 44

Original Poster
Rep: Reputation: 15
i got the exactly same permission that u mentioned
 
Old 10-06-2006, 04:32 PM   #9
ygloo
Member
 
Registered: Aug 2006
Distribution: slack
Posts: 323

Rep: Reputation: 30
see - http://www.jalix.org/ressources/linu...vrac/cron.html
it is a good idea to keep files toghether

Last edited by ygloo; 10-06-2006 at 04:40 PM.
 
Old 10-06-2006, 04:39 PM   #10
somsahi
Member
 
Registered: Aug 2006
Posts: 44

Original Poster
Rep: Reputation: 15
YGLOO THAT only I am doing keeping all three files in same directory that is home/wasdmin/jar

but dont know nothing happening
 
Old 10-06-2006, 04:48 PM   #11
ygloo
Member
 
Registered: Aug 2006
Distribution: slack
Posts: 323

Rep: Reputation: 30
have to tell crontab username:

crontab -u paul paul.ct
 
Old 10-06-2006, 04:49 PM   #12
somsahi
Member
 
Registered: Aug 2006
Posts: 44

Original Poster
Rep: Reputation: 15
/bin/sh: home/wasadmin/jar/audit.sh: No such file or directory
I am geting this error but audit.sh is there but dont know y this error
 
Old 10-06-2006, 05:09 PM   #13
somsahi
Member
 
Registered: Aug 2006
Posts: 44

Original Poster
Rep: Reputation: 15
issue solved cron is running
 
  


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
Can any one plz explain why/what for cron.d, cron.daily, cron.weekly etc are there. mavinashbabu Linux - Newbie 4 09-21-2006 02:50 PM
Cron not seeming to be working? MadCactus Red Hat 2 09-09-2006 12:31 PM
cron doesnt seem to be working rsmccain Linux - General 4 06-30-2006 01:24 AM
Cron not working robbiemorgan Linux - Newbie 6 09-16-2004 11:47 AM
Cron/at not working Wynd Linux - General 1 09-12-2003 12:22 AM


All times are GMT -5. The time now is 06:22 PM.

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