- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- scheduling a shell script
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
тАО01-17-2006 03:41 AM
тАО01-17-2006 03:41 AM
i want to schedule a shell script jasmine.sh to execute every day at a particular time but don't want to put it in cron job. i want to execute as a login account on mine i.e. as a non-root user.
how can i achieve this ?
thanks,
shiv
Solved! Go to Solution.
- Tags:
- crontab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-17-2006 03:46 AM
тАО01-17-2006 03:46 AM
SolutionDear Shiv,
you can add the entry in the crontab, ( in the command field)
su -
now, in the sheduled intervals , the script will be executed as the
With Regards,
Siva.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-17-2006 03:47 AM
тАО01-17-2006 03:47 AM
Re: scheduling a shell script
echo "/full_path/script.sh" | at 0200 tomorrow
Just add that line to the end of your script and it will repeat every day.
Pete
Pete
- Tags:
- AT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-17-2006 03:55 AM
тАО01-17-2006 03:55 AM
Re: scheduling a shell script
First the user must be allowed to use cron. Add the user to /var/adm/cron/cron.allow
Then the user can edit his/her crontab with the 'crontab -e' command. Or root can edit another users crontab via 'crontab -e username'.
When the jobs run they will be run as that user.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-17-2006 05:44 AM
тАО01-17-2006 05:44 AM
Re: scheduling a shell script
The use of echo "/$PATH/filename" | at
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-17-2006 05:49 AM
тАО01-17-2006 05:49 AM
Re: scheduling a shell script
let sysadm add your name to at.allow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-17-2006 05:57 AM
тАО01-17-2006 05:57 AM
Re: scheduling a shell script
I use HP SIM to login and run commands for me regularly, and it has a 'run now' option, and a 'schedule' option.
Short of running cron or some other scheduler, this is likely your best (free) bet. SIM is normally used for monitoring, but I use it for sysadmin tasks much more than monitoring.
Hope it helps
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-17-2006 03:04 PM
тАО01-17-2006 03:04 PM
Re: scheduling a shell script
"at" is the command to help you.
http://docs.hp.com/en/B2355-60127/at.1.html
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-17-2006 03:22 PM
тАО01-17-2006 03:22 PM
Re: scheduling a shell script
i usually prefer:
20 09 * * * echo "/prod/myscripts/jasmine.sh"|su - shiv 1>/prod/script/logfiles/output-jasmine.crn 2>/prod/script/logfiles/error-jasmine.crn
using cron of course
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-17-2006 03:41 PM
тАО01-17-2006 03:41 PM
Re: scheduling a shell script
you can use both "at" and cron jobs to do it.