cron jobs not running from sudo

Thread Tools Search this Thread
Operating Systems Solaris cron jobs not running from sudo
# 1  
Old 09-25-2009
cron jobs not running from sudo

I am logging into sun solaris unix box as asood user.Then sudo su_appssu
and scheduled my cron jobs.The user appssu is there In the /etc/cron.d/cron.allow . I do not understand why the jobs are not kicking by cron. Do I need to enter directly as appssu ?

# 2  
Old 09-25-2009
I have done a su and added cron entries that worked. Whats the cron entry that you added? What OS are you using? Did you check the 'x' permission of the script that you cron?
# 3  
Old 09-25-2009
crontab -l
32 23 * * * touch /u/xcs/xcsqc/scripts/testc
41 21 * * * ksh '/u/xcs/xcsqc/scripts/testcron.ksh > /u/xcs/xcsqc/scripts/testc.log'

ls -ltr testcron.ksh
-rwxr-xr-x 1 xcsqc xcs 73 Sep 24 21:38 testcron.ksh
# 4  
Old 09-25-2009
Whats the cron output? Did you try running the cron script from the prompt rather than from cron?
# 5  
Old 09-25-2009
Originally Posted by megh
41 21 * * * ksh '/u/xcs/xcsqc/scripts/testcron.ksh > /u/xcs/xcsqc/scripts/testc.log'
The previous entry looks incorrect. It should be something like:
41 21 * * * ksh -c '/u/xcs/xcsqc/scripts/testcron.ksh > /u/xcs/xcsqc/scripts/testc.log'

or better:
41 21 * * * /u/xcs/xcsqc/scripts/testcron.ksh > /u/xcs/xcsqc/scripts/testc.log

# 6  
Old 09-25-2009
can you just double check if the cron.deny files do not have the userID in there?
IF both files have userID in them, then solaris by default would read the cron.deny, thus rejecting the cron from executing.
secondly, check out this link
# 7  
Old 09-25-2009
incredible, if a cron command can't execute because it's incorrectly written, there is no much point (yet) investigating if the cron.deny/ cron.allow are involved.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Cron jobs not running on time

on linux redhat, ubuntu systems, what reason would there be for a cron job not running at exactly the time it was scheduled to run, everytime? meaning, if i put something in cron to run every 120 seconds (2 minutes), why is it that some times, i find that cron would sometimes run the job a few... (1 Reply)
Discussion started by: SkySmart
1 Replies

2. Red Hat

Cron Jobs not running at scheduled time

I've scheduled few jobs using cron. But they are not running ..... What might be the possible reasons ?? Also tell me how to troubleshoot............. Please help me ....... Thanks in Advance. (2 Replies)
Discussion started by: vamshigvk475
2 Replies

3. Red Hat

cron jobs not running during certain window

Hi, I'm currently experiencing a problem on one of our servers at work where between the hours of approx. 1:00 AM and 2:0 AM no jobs scheduled through cron run. Now, in the cron logs I do see that all jobs are launched and I'm not seeing any errors anywhere - but - none of the jobs... (2 Replies)
Discussion started by: tunachamp
2 Replies

4. Shell Programming and Scripting

Running Cron -- same time jobs

Hi Is it possible to run different cron jobs at the same time? It appears that when I run ones at 15 min granularity that they may prevent ones running later in the day. Should crons run at same time have impact on one another? (4 Replies)
Discussion started by: rob171171
4 Replies

5. Shell Programming and Scripting

Cron Jobs Still Running In Backgound

Hi guys, I've got a few cron jobs ... porblem is they are running as intended but some of them just tend to stay there in sleeping mode for quite some time ... sometimes even days ... for example when i run the ps command i can see that some are still there although the same script had run many... (6 Replies)
Discussion started by: King Nothing
6 Replies

6. OS X (Apple)

cron jobs running, but not...

I have a cron job set up to run a script on my Leopard Server every night. The job is set up as root, and when I run the script manually, it runs fine. The problem is that it is not doing anything when it runs at night. In the cron log, it says it ran, but did not output the results to the file it... (3 Replies)
Discussion started by: yodomino6
3 Replies

7. UNIX for Advanced & Expert Users

Seriously, cron jobs not running.

Before I get a million and one suggestions on all the things that could be wrong with my scripts - let me assure everyone that this is not the issue. i have a RH EL ES4 server that stopped running all cron jobs except hourly, daily, weekly. This has affected all users including root. No... (7 Replies)
Discussion started by: bill_k_Lopez
7 Replies

8. UNIX for Dummies Questions & Answers

How to tell which cron jobs are still running?

I have some cron jobs that are taking a might long time. That is because they are screen scrapers and I inserted an extra long pause (10 minutes between screens) to be extra polite and minimize network traffic. I was going to have them run once a day but now I'm thinking once a week. How do I... (2 Replies)
Discussion started by: siegfried
2 Replies

9. UNIX for Dummies Questions & Answers

running cron jobs

I would like to add a job using cron. I have following questions - cron jobs are launched using what login-id e.g. is the script launced using my login-id - In which directory would the cron jobs be launched ? - where do the environment variables required in the script being lauched come... (3 Replies)
Discussion started by: sharanbr
3 Replies

10. Shell Programming and Scripting

running cron jobs

Hi, I'm new to cron and I would like to know if this cron entry looks right. Every monday to friday, at 9:15 AM execute the script called Every monday to friday, at 3:15 PM execute the script called 15 09 * * /u54/jobs/ 45 15 * *... (1 Reply)
Discussion started by: ted
1 Replies
Login or Register to Ask a Question