- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Scheduling cron in Seconds
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
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
тАО06-29-2007 06:06 PM
тАО06-29-2007 06:06 PM
As in cron we have minimum time scheduling as one minute, is there any way to use the cron for seconds say 30 sec.
help me out whether it is possible or not, if yes then please any general EXAMPLE for the same.
Thanks in Advance,
Points Later
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2007 06:19 PM
тАО06-29-2007 06:19 PM
SolutionIf you want seconds, you probably shouldn't be stopping and starting your process and just keep it running all the time as a demon.
While at(1) allows you to specify seconds, you can't use seconds for the "next" option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2007 06:51 PM
тАО07-01-2007 06:51 PM
Re: Scheduling cron in Seconds
this is possbile using 'at' command. From man at:
-t spectime Define the absolute time to start the job.
spectime A date and time in the format:
[[CC]YY]MMDDhhmm [ . ss ]
where the decimal digit pairs are
as follows:
CC The first two digits of the
year (19, 20).
YY The second two digits of the
year (69-99, 00-68). See
WARNINGS.
MM The month of the year (01-12).
DD The day of the month (01-31).
hh The hour of the day (00-23).
mm The minute of the hour
(00-59).
ss The second of the minute
(00-61).
Man at for further info.
HTH,
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2007 02:41 AM
тАО07-02-2007 02:41 AM
Re: Scheduling cron in Seconds
first you should be shure, that possibly overlapping crobjobs do not occure or are meaningless.
Then you could start two cronjobs:
* hour day month wday /path/to/jobs args
* hour day month wday sleep 30 && /path/to/jobs args
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2007 05:49 AM
тАО07-02-2007 05:49 AM
Re: Scheduling cron in Seconds
...even though the cron daemon checks only once a minute. It could start the job on the appropriate MM and sleep in .ss seconds...
Simple Workaround:
Create a script "delay_cmd"
#!/bin/sh
# Script: delay_cmd
sleep $1
shift
$*
Then run your command with:
delay_cmd 10 mycommand parameters
This would run "mycommand parameters" after sleeping 10 seconds
/Tor-Arne
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2007 04:42 PM
тАО07-02-2007 04:42 PM
Re: Scheduling cron in Seconds
I was aware that scheduling cron in seconds is not possible in general as minimum frequency for cron is one minute but i was looking for any other simple way to take output from cron in seconds.
please forward me any link have information regarding cron and its functionality.
thanks again for all support
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2007 05:39 PM
тАО07-02-2007 05:39 PM
Re: Scheduling cron in Seconds
the default man page itself is clear enough, please see:
http://nixdoc.net/man-pages/HP-UX/man1M/cron.1M.html
and also:
http://en.wikipedia.org/wiki/Crontab
hope this helps!
kind regards
yogeeraj