- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Run script in background as process
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
02-22-2008 05:15 AM
02-22-2008 05:15 AM
I am having one .scr script. I want to run it as background process means once it is scheduled it will running like deamon i am not bother to run it manuaaly.
Can anyone suggest me how to do it please?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2008 06:12 AM
02-22-2008 06:12 AM
Re: Run script in background as process
Typically you would use 'cron' for jobs which 'end' and should be scheduled at set intervals.
And you would use 'init' for jobs to be launched when the system is started.
Please read up on the manpages for cron and init and look for examples on your system.
If you have further, detailed questions, after trying some, please elaborate with the exact commands tried and the (exact) problems (error messages) you experienced.
Good luck!
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2008 07:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2008 09:04 AM
02-22-2008 09:04 AM
Re: Run script in background as process
while true
do
/failover/rsync.sh ${RSYNC_CFG}
sleep ${INTERVAL}
done
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2008 10:07 AM
02-22-2008 10:07 AM
Re: Run script in background as process
the redirection can be explicit to /dev/null, a file or a pipe, but if still tty, output will be redirect to $HOME/nohup.out
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2008 10:56 PM
02-24-2008 10:56 PM
Re: Run script in background as process
Apologies for late reply. Thanks for your valuable reply.
nohup script & is working for me.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2008 08:50 AM
02-25-2008 08:50 AM
Re: Run script in background as process
I have always followed the following conventions when running 'persistant' scripts:
1. If the script does not absolutly need to run when the machine is rebooted, allow a user with sufficient permissions to start the script. I usually write a short shell wrapper so the user doesn't have to worry about the details of the script.
2. If the script must be started each time the machine is rebooted, you have 2 choices:
a. an rc script which will start the process on reboot - or -
b. an entry in the /etc/inittab file.
Which method I use is determined by the the following:
1. If the script needs to be running at all times, I use /etc/inittab with the 'respawn' option.
2. If it can fail or be terminated without causing a major problem, I use the rc start-up method.
Just my 2cts. worth
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2008 04:12 AM
02-27-2008 04:12 AM
Re: Run script in background as process
Go through this link.
This will guide you with examples for scheduling the scripts.
http://www.adminschoice.com/docs/crontab.htm
Thanks
Vivek Bhatia