- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: cronjob not workin for non-root user
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2011 10:40 PM
01-06-2011 10:40 PM
cronjob not workin for non-root user
- Tags:
- cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2011 11:24 PM
01-06-2011 11:24 PM
Re: cronjob not workin for non-root user
# crontab -l
crontab: you are not authorized to use cron. Sorry.
You check the /var/adm/cron/cron.allow file,it is probably empty. The you have to put the user name inside the file to allow cronjob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2011 11:25 PM
01-06-2011 11:25 PM
Re: cronjob not workin for non-root user
and my user is added in cron.allow file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2011 11:33 PM
01-06-2011 11:33 PM
Re: cronjob not workin for non-root user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2011 11:38 PM
01-06-2011 11:38 PM
Re: cronjob not workin for non-root user
my script is running manually & root users cron is running fine
is there any other file to check the cron log for specified user other than root
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2011 11:55 PM
01-06-2011 11:55 PM
Re: cronjob not workin for non-root user
Expect mail? Expect an action in a disk file?
>is there any other file to check the cron log
Not really. Have you checked /var/adm/syslog/mail.log?
Have you done a "crontab -e" to make sure cron(1m) knows there is a change?
I assume there is a file in /var/spool/cron/crontabs/ for that user?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2011 12:06 AM
01-07-2011 12:06 AM
Re: cronjob not workin for non-root user
i have tried crontab -e also..
is there anything else i have to check??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2011 12:21 AM
01-07-2011 12:21 AM
Re: cronjob not workin for non-root user
Do you see your script even being invoked by cron(1m)?
You should see:
> CMD: your crontab line
> username 2910 c Sun Jul 18 13:23:00 PDT 2010
< username 2910 c Sun Jul 18 13:23:16 PDT 2010
The last two are start and stop times.
If you see an entry, you need to debug your script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2011 12:45 AM
01-07-2011 12:45 AM
Re: cronjob not workin for non-root user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2011 01:15 AM
01-07-2011 01:15 AM
Re: cronjob not workin for non-root user
Restart cron?
/sbin/init.d/cron stop
/sbin/init.d/cron start
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2011 01:31 AM
01-07-2011 01:31 AM
Re: cronjob not workin for non-root user
# ps -ef |grep cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2011 08:24 AM
01-07-2011 08:24 AM
Re: cronjob not workin for non-root user
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2011 04:41 AM
01-08-2011 04:41 AM
Re: cronjob not workin for non-root user
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