I'm having a problem with the Linux (unix) at command. I have a program/script that needs to run another program/script within seconds. Unfortunately the at command only accepts minutes as input. Therefore, scheduling a command within a minute (i.e. adding 1 minute to the current time), can cause the command to run within 1 to 60 seconds. (Add 1 minute to a time such as 11:43:59 will cause it to run at 11:44:00, one second later.) I don't quite understand why unix has this limitation. Is there something else I should be considering?
TIA,
Frank M. Ramaekers Jr. Systems Programmer; MCP, MCP+I, MCSE & RHCE American Income Life Insurance Company Phone: (254) 761-6649 Fax: (254) 741-5777
I'm having a problem with the Linux (unix) at command. I have a program/script that needs to run another program/script within seconds. Unfortunately the at command only accepts minutes as input. Therefore, scheduling a command within a minute (i.e. adding 1 minute to the current time), can cause the command to run within 1 to 60 seconds. (Add 1 minute to a time such as 11:43:59 will cause it to run at 11:44:00, one second later.) I don't quite understand why unix has this limitation. Is there something else I should be considering?
You might want to fire the second script from the first with whatever delay you deem appropriate and only use at to launch the first script.
Bob Styma
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Frank M. Ramaekers Sent: Tuesday, March 20, 2007 10:41 AM To: CentOS mailing list Subject: [CentOS] Linux at command
I'm having a problem with the Linux (unix) at command. I have a program/script that needs to run another program/script within seconds. Unfortunately the at command only accepts minutes as input. Therefore, scheduling a command within a minute (i.e. adding 1 minute to the current time), can cause the command to run within 1 to 60 seconds. (Add 1 minute to a time such as 11:43:59 will cause it to run at 11:44:00, one second later.) I don't quite understand why unix has this limitation. Is there something else I should be considering?
TIA,
Frank M. Ramaekers Jr. Systems Programmer; MCP, MCP+I, MCSE & RHCE American Income Life Insurance Company Phone: (254) 761-6649 Fax: (254) 741-5777
You could just run the other script and run a sleep command at the beginning of it for a specified number of seconds. I know it's not clean but at least it's another avenue to explore.
Michael
On Tue, March 20, 2007 10:40 am, Frank M. Ramaekers wrote:
I'm having a problem with the Linux (unix) at command. I have a program/script that needs to run another program/script within seconds. Unfortunately the at command only accepts minutes as input. Therefore, scheduling a command within a minute (i.e. adding 1 minute to the current time), can cause the command to run within 1 to 60 seconds. (Add 1 minute to a time such as 11:43:59 will cause it to run at 11:44:00, one second later.) I don't quite understand why unix has this limitation. Is there something else I should be considering?
You might want to take a look at the sleep command.
Frank M. Ramaekers wrote:
I'm having a problem with the Linux (unix) at command. I have a program/script that needs to run another program/script within seconds. Unfortunately the at command only accepts minutes as input. Therefore,
echo runme | at now
scheduling a command within a minute (i.e. adding 1 minute to the current time), can cause the command to run within 1 to 60 seconds. (Add 1 minute to a time such as 11:43:59 will cause it to run at 11:44:00, one second later.) I don't quite understand why unix has this limitation. Is there something else I should be considering?
TIA,
Frank M. Ramaekers Jr. Systems Programmer; MCP, MCP+I, MCSE & RHCE American Income Life Insurance Company Phone: (254) 761-6649 Fax: (254) 741-5777
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos