Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

at-command

0 views
Skip to first unread message

fund...@gmail.com

unread,
May 8, 2008, 10:07:35 AM5/8/08
to
I've got a script which has a set of commands and at the end invokes
itself using the "at" command for a run next day at the same time and
then carrying on with the self scheduling. However I've seen that
when the script is run manually it does schedule itself for the next
day, but next day it fails to schedule for the day after. Is there a
reason for that?

btw .. the script is in Korn shell.

what am I missing in trying to get this script to run and schedule
itself for work next day???

format of the script file ( test_script.ksh) :

#..............................................
#!/bin/ksh

command 1
command 2
command 3
command 4
...
...

at -f $SCRIPT_DIR/test_script.ksh 08:00 tomorrow > /tmp/test.log
#.......................................

Bill Marcum

unread,
May 8, 2008, 11:06:14 AM5/8/08
to
On 2008-05-08, fund...@gmail.com <fund...@gmail.com> wrote:
>
>
> I've got a script which has a set of commands and at the end invokes
> itself using the "at" command for a run next day at the same time and
> then carrying on with the self scheduling. However I've seen that
> when the script is run manually it does schedule itself for the next
> day, but next day it fails to schedule for the day after. Is there a
> reason for that?
>
> btw .. the script is in Korn shell.
>
> what am I missing in trying to get this script to run and schedule
> itself for work next day???
>
Does the script set the variable SCRIPT_DIR? Also, shouldn't you be
using cron for a script that runs every day?

marty....@gmail.com

unread,
May 11, 2008, 9:47:48 PM5/11/08
to
On May 8, 11:06 am, Bill Marcum <marcumb...@bellsouth.net> wrote:

i always found it useful to set the schedule _before_ executing any
commands,
as well as taking Bill's advice to make sure the variables were all
set.

b.t.w. the simplest test to get started is:

"run me in two minutes"
"do something to prove I was executed".

After getting this working, you can reliably change the interval to
"tomorrow",
followed by your real commands.

Good Luck,

fund...@gmail.com

unread,
May 14, 2008, 6:05:56 AM5/14/08
to
On May 12, 2:47 am, "marty.mcgo...@gmail.com"

<marty.mcgo...@gmail.com> wrote:
> On May 8, 11:06 am, Bill Marcum <marcumb...@bellsouth.net> wrote:
>
>
>
>
>
> > On 2008-05-08, fundo...@gmail.com <fundo...@gmail.com> wrote:
>
> > > I've got a script which has a set of commands and at the end invokes
> > > itself  using the "at"commandfor a run next day at the same time and

> > > then carrying on with the self scheduling.  However I've seen that
> > > when the script is run manually it does schedule itself for the next
> > > day, but next day it fails to schedule for the day after. Is there a
> > > reason for that?
>
> > > btw .. the script is in Korn shell.
>
> > > what am I missing in trying to get this script to run and schedule
> > > itself for work next day???
>
> > Does the script set the variable SCRIPT_DIR?  Also, shouldn't you be
> > using cron for a script that runs every day?
>
> i always found it useful to set the schedule _before_ executing any
> commands,
> as well as taking Bill's advice to make sure the variables were all
> set.
>
> b.t.w.   the simplest test to get started is:
>
>    "run me in two minutes"
>    "do something to prove I was executed".
>
> After getting this working, you can reliably change the interval to
> "tomorrow",
> followed by your real commands.
>
> Good Luck,- Hide quoted text -
>
> - Show quoted text -

Yup variables are set, and I do agree with Bill that cron should have
been used, and thats what I am pushing the developers to release to
production. Currently, my short-term fix is that I've put the job into
cron for alternate days.

I myself am not a huge fan of the "at daemon". Thanks anyways for your
help and suggestions, will keep in mind if I do happen to use the "at
daemon" in the future.

0 new messages