Operating System - Linux
1748203
Members
3285
Online
108759
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
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
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
тАО07-22-2008 01:13 PM
тАО07-22-2008 01:13 PM
cron job
Hi,
i have a shell scirpt which captures the output of a command using "script" command. i would like to run this shell script using cron job and this is not working as shell script is running a command using script command which i believe run the command in different shell.
is there a work around this problem? how could i run the shell script using cron?
Thanks,
Chakri
i have a shell scirpt which captures the output of a command using "script" command. i would like to run this shell script using cron job and this is not working as shell script is running a command using script command which i believe run the command in different shell.
is there a work around this problem? how could i run the shell script using cron?
Thanks,
Chakri
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-22-2008 02:31 PM
тАО07-22-2008 02:31 PM
Re: cron job
hey
source your profile at the begin of your script, so that you have not the standard cron shell. e.g. you set the PATH env var in your profile etc..
to source your profile:
. /home/user/.profile
it would be helpful if you could poste more detail about the error of the script and also the script
regards
source your profile at the begin of your script, so that you have not the standard cron shell. e.g. you set the PATH env var in your profile etc..
to source your profile:
. /home/user/.profile
it would be helpful if you could poste more detail about the error of the script and also the script
regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2008 04:36 PM
тАО08-25-2008 04:36 PM
Re: cron job
did you schedule the script to run with the -c flag and add an "exit" at the end of the script?
e.g. crontab
* * * * * script -c "test.sh" output.log
last line of test.sh should be "exit".
e.g. crontab
* * * * * script -c "test.sh" output.log
last line of test.sh should be "exit".
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.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP