AT job (URGENT)


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting AT job (URGENT)
# 1  
Old 08-07-2008
AT job (URGENT)

Hi Guys:

I had written a "at" job in my script as follows...

at $originaltime <<ATEOF
evolve.sh ${OLDOFFICE} ${NEWOFFICE} > /mts/common/load/bin/EV/${OUT} 2>&1
ATEOF


But the problem is its not invoking the "evolve.sh" script...


Can you guys plz help me out.....
# 2  
Old 08-07-2008
Do you see it with atq? What's $originaltime? Do you get any errors?
# 3  
Old 08-07-2008
Yah..I checked atq..I am getting the following thing..
"No files in queue."..

The $originaltime is the time i am getting from the user...I am prompting like...

echo "Enter Time to run this job or RETURN to run it now. >\c"
read originaltime
if [ -z "$originaltime" ]
then
originaltime=`date '+%H%M'`
originaltime=`expr ${originaltime} + 2`
if [ ${originaltime} -ge 700 -a ${originaltime} -le 959 ]
then
originaltime="0${originaltime}"
fi
fi..

Actually the thing is if you give some time..its working..But if u press ENTER (RETURN) to run the script immediatly, it's not invoking that evolve.sh script....
# 4  
Old 08-07-2008
What's the point of running it via at if the user requests that it be run immediately?

Doesn't your at recognize the time "now"?
# 5  
Old 08-07-2008
I'd agree with era.
Your date calculations are redundant.
Almost any at should understand expressions like
Code:
echo "evolve.sh ${OLDOFFICE} ${NEWOFFICE} > /mts/common/load/bin/EV/${OUT} 2>&1" | at now +2 minutes

Of course, this would require that the dir where script evolve.sh resides
was in your $PATH, and that $OLDOFFICE, $NEWOFFICE and $OLD were set
when you fired the at job.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

URGENT Reading a file and assessing the syntax shell script URGENT

I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies

2. Shell Programming and Scripting

Script to Start a Job after finding the Old job completed

Hi Experts, I need a script advice to schedule 12 jobs ( SAS Codes execute back ground ). Algorithem: 1. Script checks first job. 2. Finds first job is done; invoke second job. 3. finds second job is done; invoke third job. .. Request you to please assist. (3 Replies)
Discussion started by: Jerald Nathan
3 Replies

3. UNIX for Dummies Questions & Answers

cron job problem(urgent)

Hey all. Im totally new with makeing websites ect The thing is, i wanted to make one of those pimp games, so i installed a script called mypimpscript.. it works but the 10mins cron jobs dont... ive tried to set it up in cpanel, but im doing it wrong :S right now it looks like this php... (1 Reply)
Discussion started by: princess
1 Replies

4. Shell Programming and Scripting

URGENT: cron job not running the sqlplus command in shell script

cron job not running the sqlplus command in shell script but the shell script works fine from command line.. Cronjob: 5 * * * * /home/dreg/script.sh script.sh: #!/bin/ksh /oracle/u000/app/oracle/product/10204/GEN/bin/sqlplus -s <user>/<pass>@<sid/home/dreg/sqlscript.sh ... (18 Replies)
Discussion started by: Ikea
18 Replies

5. UNIX for Advanced & Expert Users

URGENT,URGENT- Need help tape drive installation

Hi, I am trying to attach tape drive to sun V890 running Solaris 9 on it. I have installed HBA(qlogic) in slot 1 of 0-8 slots and booted the system. I do not see HBAin prtdiag output. The tape drive is not attached to HBA. The tape drive I am going to attach is Sony AIT3. 1.How can I make... (3 Replies)
Discussion started by: sriny
3 Replies

6. Shell Programming and Scripting

How to Schedule job using cron(URGENT)

Hello All, I m newbie to Job scheduling. Suppose i have 2 files s1.sh and s2.sh i want to make a schedule such as run s1.sh at 2AM everyday and run s2.sh 9Pm everyday. Can anyone tell me how to schdule that using CRON and i want to know what is CRON and CRONTAB. Thanks in advance (2 Replies)
Discussion started by: ravi.sadani19
2 Replies

7. Solaris

killing a unix job after the job process gets completed

Hi, Thanks in advance. i need to kill a unix background running job after that job process completes. i can kill a job by giving the following unix command kill -9 processid how to kill the job after the current process run gets completed ? Appreciate your valuable help. Thanks... (7 Replies)
Discussion started by: dtazv
7 Replies

8. Shell Programming and Scripting

killing unix job after the job process completes

Hi, Thanks in advance. i need to kill a unix background running job after that job process completes. i can kill a job by giving the following unix command kill -9 processid how to kill the job after the current process run gets completed ? Appreciate your valuable help. ... (1 Reply)
Discussion started by: dtazv
1 Replies
Login or Register to Ask a Question