Share your knowledge at the LQ Wiki.
Go Back > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.


  Search this Thread
Old 07-24-2007, 10:44 AM   #1
LQ Newbie
Registered: Jul 2007
Posts: 5

Rep: Reputation: 0
User Cron Jobs Won't Run - Pulling Hair Out

I have a rhel 4 update 4 system. User cron jobs are not running, nothing is logged anywhere.

[root@adcbkpadm01 ~]# crontab -u bkpops -l
25 10 * * * /usr/local/bkpops/sbin/grabNBUjobs >/usr/local/bkpops/logs/cron.out 2>&1

[root@adcbkpadm01 ~]# ls -l /usr/local/bkpops/sbin/grabNBUjobs
-rwxrwxr-- 1 bkpops bkpops 4159 Jul 24 10:09 /usr/local/bkpops/sbin/grabNBUjobs

As a test I had a simple script in place that merely touch's a file in /tmp. This file never gets created. Absolutely nothing is logged to /var/log/messages or /var/log/cron

I do see my edits to the bkpops user crontab in /var/log/cron:
Jul 24 10:20:56 adcbkpadm01 crontab[15860]: (root) BEGIN EDIT (bkpops)
Jul 24 10:20:59 adcbkpadm01 crontab[15860]: (root) REPLACE (bkpops)
Jul 24 10:20:59 adcbkpadm01 crontab[15860]: (root) END EDIT (bkpops)

/etc/cron.allow did not exist, so I created it and added bkpops. (/etc/cron.deny existed previously but contained no users)

I then searched google and saw a lot of people having this issue and supposedly this solved there problem:

Modify /etc/pamd.d/crond:
account required
account required accessfile=/etc/security/access-cron.conf
touch /etc/security/access-cron.conf

This did not solve my problem.

Any ideas?
Old 07-25-2007, 07:18 AM   #2
Senior Member
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
Is the script file's execute bit turned on? Can you run the script from a command line in a terminal?

Last edited by stress_junkie; 07-25-2007 at 07:20 AM.
Old 08-05-2007, 11:52 PM   #3
LQ Newbie
Registered: Jul 2007
Posts: 3

Rep: Reputation: 0
first change the permission of the file .

1. "chmod 755 /usr/local/bkpops/sbin/grabNBUjobs"
2.try to run that command from the shell prompt.
3.if it is yes , then try to run through cron. this thing to cron file " 25 10 * * * /usr/local/bkpops/sbin/grabNBUjobs > /usr/local/bkpops/logs/cron.out 2>&1 "
4.Remember every time u r changing the cron file u should restart the cron service .
5. try this command " ps afx | grep grabNBUjobs "

i hope it will work ......



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
X apps fail when run from cron jobs ericcarlson Linux - Software 6 06-16-2017 01:02 PM
How to run jobs in /etc/cron.daily? Micro420 Linux - Newbie 4 10-19-2006 02:07 PM
New Linux user, pulling hair out with Nvidia drivers ellandry SUSE / openSUSE 10 02-26-2005 06:49 AM
Can't run cron jobs as user, only root Kropotkin Linux - Newbie 5 11-10-2004 09:30 AM
Cron jobs, will they run when not logged in? nextekcarl Linux - General 18 03-30-2004 10:28 AM > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 05:37 PM.

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