- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- the profile of crontab user
Operating System - HP-UX
1825077
Members
4878
Online
109679
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО11-16-2004 08:17 PM
тАО11-16-2004 08:17 PM
the profile of crontab user
one of the user ( eg. userA ) can run the schedule job (crontab) , does this user load the /etc/profile setting when run the schedule job ? for example , I hv set the PATH setting to the /etc/profile , if the userA run the batch job , will it load this PATH setting before run the batch job ? thx
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 08:24 PM
тАО11-16-2004 08:24 PM
Re: the profile of crontab user
default for cronjobs is not to source profile. You should include it in your crontab shells or run commands in a way they source profile (ie : "su - user -c command" in root crontab or "/userhome/.profile && command" in user crontab)
Regards,
Fred
Regards,
Fred
--
"Reality is just a point of view." (P. K. D.)
"Reality is just a point of view." (P. K. D.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 08:39 PM
тАО11-16-2004 08:39 PM
Re: the profile of crontab user
Hi Peter,
acording to my experiences, crontab doesn't read neither /etc/profile nor $HOME/.profile
Therefore you should set all variables inside the scripts
br Jan
acording to my experiences, crontab doesn't read neither /etc/profile nor $HOME/.profile
Therefore you should set all variables inside the scripts
br Jan
GSM, Intelligent Networks, UNIX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-16-2004 09:24 PM
тАО11-16-2004 09:24 PM
Re: the profile of crontab user
Hi,
you should think of a user performing a cron job as a user who does not perform any kind of login; hence he does not read the "normal" files setting his environment.
As a starting point, he has only four variables, which are supplied by cron - from the man page of crontab:
HOME=user's-home-directory
LOGNAME=user's-login-id
PATH=/usr/bin:/usr/sbin:.
SHELL=/usr/bin/sh
That is why things never work!
regards,
John K.
you should think of a user performing a cron job as a user who does not perform any kind of login; hence he does not read the "normal" files setting his environment.
As a starting point, he has only four variables, which are supplied by cron - from the man page of crontab:
HOME=user's-home-directory
LOGNAME=user's-login-id
PATH=/usr/bin:/usr/sbin:.
SHELL=/usr/bin/sh
That is why things never work!
regards,
John K.
it would be nice if you always got a second chance
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP