Prev: newbie qn: shell program to copy files from one directory on the server to a remote windows machine on the same network
Next: Ambiguous output redirect
From: noelloen on 15 Sep 2006 12:27 Hi, I have a script that runs with arguemet like this, ../tstop.ksh arg1 then I want to schedule it with another script: #!/usr/bin/ksh #This is the schedule script, schedule.ksh at now + 15 minutes ./tstop.ksh $1 when I run ../schedule.ksh some_Arguement it gives error. I cannot run "at" command with command arguement. such that, at now + 15 minutes ./tstop.ksh anArgv would give an error "at: 0481-098 The specified date is not in the correct format." Thanks
From: Chris Mattern on 15 Sep 2006 12:33 noelloen wrote: > Hi, > > I have a script that runs with arguemet like this, > ./tstop.ksh arg1 > > then I want to schedule it with another script: > > #!/usr/bin/ksh > #This is the schedule script, schedule.ksh > at now + 15 minutes ./tstop.ksh $1 > > when I run > ./schedule.ksh some_Arguement > it gives error. > > I cannot run "at" command with command arguement. > such that, > at now + 15 minutes ./tstop.ksh anArgv > would give an error "at: 0481-098 The specified date is not in the > correct format." > > Thanks > You are not specifying the time you wish the command to run in a format that at understands. The available formats can differ, so I would suggest you read at's man page. -- Christopher Mattern "Which one you figure tracked us?" "The ugly one, sir." "...Could you be more specific?"
From: Bill Marcum on 15 Sep 2006 12:55 On 15 Sep 2006 09:27:35 -0700, noelloen <noel.yim(a)gmail.com> wrote: > Hi, > > I have a script that runs with arguemet like this, > ./tstop.ksh arg1 > > then I want to schedule it with another script: > > #!/usr/bin/ksh > #This is the schedule script, schedule.ksh > at now + 15 minutes ./tstop.ksh $1 > > when I run > ./schedule.ksh some_Arguement > it gives error. > > I cannot run "at" command with command arguement. > such that, > at now + 15 minutes ./tstop.ksh anArgv > would give an error "at: 0481-098 The specified date is not in the > correct format." > "at" takes commands as standard input. echo "`pwd`/tstop.ksh anArgv" | at now + 15 minutes -- The best laid plans of mice and men are usually about equal. -- Blair
From: noelloen on 15 Sep 2006 13:24
Bill Marcum wrote: > On 15 Sep 2006 09:27:35 -0700, noelloen > <noel.yim(a)gmail.com> wrote: > > Hi, > > > > I have a script that runs with arguemet like this, > > ./tstop.ksh arg1 > > > > then I want to schedule it with another script: > > > > #!/usr/bin/ksh > > #This is the schedule script, schedule.ksh > > at now + 15 minutes ./tstop.ksh $1 > > > > when I run > > ./schedule.ksh some_Arguement > > it gives error. > > > > I cannot run "at" command with command arguement. > > such that, > > at now + 15 minutes ./tstop.ksh anArgv > > would give an error "at: 0481-098 The specified date is not in the > > correct format." > > > "at" takes commands as standard input. > > echo "`pwd`/tstop.ksh anArgv" | at now + 15 minutes > > > -- > The best laid plans of mice and men are usually about equal. > -- Blair Thanks it works great. |