LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cron Job not working (https://www.linuxquestions.org/questions/linux-newbie-8/cron-job-not-working-4175478887/)

seyiisq 09-28-2013 11:44 AM

Cron Job not working
 
Hello All,
I am using REDHAT Linux and I am just learning Linux
I created a cron job to run at specific time everything seems alright initially until I checked the /var/log/cron.

Below are my observations

Code:

linux>ps -A | grep cron
 2099 ?        00:01:45 crond
19204 ?        00:00:00 crond

Linux>su -
Password:
[root@xxx ~]# ls -l /val/log/cron.log
ls: /val/log/cron.log: No such file or directory

[root@pserver ~]#  chkconfig --list|grep cron
anacron        0:off  1:off  2:on    3:on    4:on    5:on    6:off
crond          0:off  1:off  2:on    3:on    4:on    5:on    6:off

[root@pserver ~]# tail /var/log/cron
Sep 28 17:26:01 pserver crond[19698]: PAM (system-auth) illegal module type: uth
Sep 28 17:26:01 pserver crond[19698]: PAM unable to dlopen(/lib/security/$ISA/)
Sep 28 17:26:01 pserver crond[19698]: PAM [dlerror: /lib/security/../../lib/security/: cannot read file data: Is a directory]
Sep 28 17:26:01 pserver crond[19698]: PAM adding faulty module: /lib/security/$ISA/
Sep 28 17:26:01 pserver crond[19699]: (root) CMD (/etc/init.d/mfe-dbs-sensor monitor > /dev/null 2>&1)
Sep 28 17:27:01 pserver crond[19740]: PAM (system-auth) illegal module type: uth
Sep 28 17:27:01 pserver crond[19740]: PAM unable to dlopen(/lib/security/A/)
Sep 28 17:27:01 pserver crond[19740]: PAM [dlerror: /lib/security/../../lib/                            security/: cannot read file data: Is a directory]
Sep 28 17:27:01 pserver crond[19740]: PAM adding faulty module: /lib/security/$ISA/
Sep 28 17:27:01 pserver crond[19741]: (root) CMD (/etc/init.d/mfe-dbs-sensor monitor > /dev/null 2>&1)

Please can anyone advice. I am not sure of what else to do

Thanks

Firerat 09-28-2013 11:59 AM

Quote:

Originally Posted by seyiisq (Post 5036458)
I am not sure of what else to do

Thanks

you could post your cronjob script(s)

schneidz 09-28-2013 12:25 PM

maybe its not finding where the executables are... that is usually fixed by putting the whole /path/to/filename in the scripts.

pan64 09-28-2013 01:21 PM

you should always remember, cron has its own environment, so you would need to use full path to your executables also you would need to collect info (stdout, stderr) to be able to find out what's happening (for example):
* * * * * /full/path/to/app args >/full/path/to/log/stdout 2>/full/path/to/log/stderr


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