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
Discussions
Discussions
Forums
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
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
тАО07-28-2004 09:22 PM
тАО07-28-2004 09:22 PM
crontab
What I mean is that I have a shell script which has one foreground job and one background job.
It works well if I start it from the command line.
But the background job doesn't work if it is started by crontab.
Do anyone have any ideas?
Please reply me asap. Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2004 09:24 PM
тАО07-28-2004 09:24 PM
Re: crontab
Cron has another environment than the command line
You probably need to give full names for all commands and export all values
If it runs as a specific setup then add
. /home/user/.profile
To the script to run the profile in the same processing level
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2004 09:34 PM
тАО07-28-2004 09:34 PM
Re: crontab
Pls do not forget *always* start your script with the desired shell, i.e:
#!/sbin/sh
your_procedure_line1
your_procedure_line2
etc...
Also do not forget uses the full path assignment for each command. To locate a full command path use:
#whence
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2004 09:41 PM
тАО07-28-2004 09:41 PM
Re: crontab
You have to specify PATH. include .profile is the easiest way to do that.
And is good to specify output of scripts if it exists. Otherwise the output is directed to mail of user(owner).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2004 09:48 PM
тАО07-28-2004 09:48 PM
Re: crontab
in my opinion it is not needed to run jobs on background via cron.
Normally it is used only if you have only one tty and want to have access on the tty and run some jobs simultaneously.
I suggest only redirect STDOUT & STDERR into logfile
23 59 * * * /job.sh > /tmp/job.log 2>&1
hope tih will help you
br Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-28-2004 09:53 PM
тАО07-28-2004 09:53 PM