Operating System - HP-UX
1753924 Members
9553 Online
108810 Solutions
New Discussion юеВ

Re: cronjob not workin for non-root user

 
Hakki Aydin Ucar
Honored Contributor

Re: cronjob not workin for non-root user

Can you see the cron daemon is running ?
# ps -ef |grep cron
Rita C Workman
Honored Contributor

Re: cronjob not workin for non-root user

Did you make sure that your script has everything it needs within it to run via cron?

Remember, when you're running from cron it needs all the environment made available.

When you're running from command line, you are logged in and have your environment running for you.

Just a thought,
Rita

INH
Regular Advisor

Re: cronjob not workin for non-root user

Hello,
1) firstly you need to check whether your job is invoked by cron or not
# /var/adm/cron/log
....
> CMD: your crontab line
> username 2910 c time of job in cron

& check /var/adm/cron/cron.allow file

2) Give a look on permissions and environment of the file(s)

3)Restart cron & check
/sbin/init.d/cron stop
/sbin/init.d/cron start
# ps -ef |grep cron

5)
--------
my cronjob for non-root user was working fine before the restart of the server but after the restart cronjob for non-root user is not working.
--------
if nothing changed prior to reboot then probably environment variable or you may cross check syntax in crontab -l & crontab -e ( edit)issue. As you said you are able to run it mannually

HTH

Regards,
INH
Knowledge is power