- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Add a crontab job
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
тАО10-30-2006 03:16 PM
тАО10-30-2006 03:16 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2006 03:33 PM
тАО10-30-2006 03:33 PM
Re: Add a crontab job
you can do it the hard way!
***** your_script; your_script; your_script; your_script; your_script;
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2006 03:35 PM
тАО10-30-2006 03:35 PM
Solutionor you can write another script so that it contains that commands 5 times inside!
vi script_run5times.sh
your_script; # run 1
your_script; # run 2
your_script; # run 3
your_script; # run 4
your_script; # run 5
then in your crontab:
***** script_run5times.sh
hope this helps too!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2006 04:23 PM
тАО10-30-2006 04:23 PM
Re: Add a crontab job
sorry , what my requirement is the crontab job run at every 20 seconds , can advise what can i do ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2006 05:33 PM
тАО10-30-2006 05:33 PM
Re: Add a crontab job
Try this;
0,15,30,45 * * * * your script
Note:
I have not tried it on my machine.
HTH,
Prabu.S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2006 05:34 PM
тАО10-30-2006 05:34 PM
Re: Add a crontab job
Try this;
0,20,40,60 * * * * your script
Note:
I have not tried it on my machine.
HTH,
Prabu.S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2006 06:58 PM
тАО10-30-2006 06:58 PM
Re: Add a crontab job
#!/usr/bin/ksh
for myrun in 1 2 3
do
orig_script &
sleep 20
done
exit
and schedule it with crontab with "* * * * *"
Yang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2006 08:46 PM
тАО10-30-2006 08:46 PM
Re: Add a crontab job
You could run your script 5 times within another script with a sleep statement, but there's no guarantee that it will happen every 20 seconds.
regards,
Darren.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-30-2006 09:11 PM
тАО10-30-2006 09:11 PM
Re: Add a crontab job
it is not possible to do this directly with 'cron'. If you do not want to realize this in a script by yourself (as previous posterd recommended - as well as I), do this by five corntab entries:
* * * * * /path_to/myscript
* * * * * sleep 12; /path_to/myscript
* * * * * sleep 24; /path_to/myscript
* * * * * sleep 36; /path_to/myscript
* * * * * sleep 48; /path_to/myscript
Are you shure, one instance of 'myscript' is terminated before the next is started? You'll get loads of processes 'myscript'!
mfG Peter