scheduling a job using at command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting scheduling a job using at command
# 1  
Old 09-25-2012
scheduling a job using at command

Hi All,

I've been trying to schedule a job using the at command on Solaris 5.10 but i've been running into some issue. ( Not allowed to use cron Smilie )

I have a script that reads a logs file, does some iteration and cat's the output in an email .

Code:
## the o/p of /home/myscript.sh is : 

Hello world.

i need to run this script every day at 9:00 AM and i read up on at and saw some examples on the internet and came up with the below :

Code:
cat /home/myscript.sh 

...
...
...

echo /home/myscript.sh | at now tomorrow

basically, i embedded the at job in the script, so when i run the script manually it schedules another job for tomorrow and the loop continues.
I've also checked the atq and i can see the job scheduled for tomorrow.

the problem is when i checked this morning , i see no email and i checked the log which the script outputs to and it never ran .

can some one point out where i went wrong. (FYI i also tried the my.daily and recursive scheduling but at doesnt like
Code:
at -f /home/myscript.sh now tomorrow < my.daily

error: at bad time specification
# 2  
Old 09-26-2012
In at, now means at this time today. Specifying now and tomorrow gives conflicting specifications for when the job should be run. If you want to run a job every day at about noon, you can start it off some morning by saying:
Code:
at -f /home/myscript.sh noon < my.daily

and use the command:
Code:
at -f /home/myscript.sh noon tomorrow < my.daily

in myscript.sh to have it schedule itself to run again the next day.
This User Gave Thanks to Don Cragun For This Post:
# 3  
Old 09-30-2012
sorry for the late reply. your suggestion worked . thanks for the help.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Job Scheduling

Hi All, I am new to unix and i have a task in front of me. The code part is "android update sdk" . I need to crontab this process. Hence i have written a script that runs the above command and sends a mail once the update is done. The problem with the automation is the installer asks for a... (5 Replies)
Discussion started by: Kashyap
5 Replies

2. Shell Programming and Scripting

Job scheduling on demand

I am writing a script to run the jobs on demand, like when i am done with some online updates i want to run the sheduler script to schedule the job 1 by 1. It executes the following way sched.ksh <data file> The data file will have the jobs to be executed in the order to be executed and... (1 Reply)
Discussion started by: nw2unx123
1 Replies

3. Solaris

Scheduling job not triggering

I am scheduling job using Datastage tool, which tool is installed on solaris server. I can able to schedule jobs/sequences, its not trigering at specified scheduling trigerring time. but at specified job not starting automatically. Till that specified schedule time, i can able to see that the job... (6 Replies)
Discussion started by: sridhardwh
6 Replies

4. UNIX and Linux Applications

Job Scheduling (Autosys)

Hello! I will be working with Autosys and I am looking for individuals that have knowledge of this UNIX application. Thank-you! (3 Replies)
Discussion started by: preshe79
3 Replies

5. UNIX for Advanced & Expert Users

Autosys job scheduling

Hi, I want to schedule a job through Autosys (in Linux server) to run on 1st day of every 3rd month(gap of 90 days). Please someone help me to achive my above requirement Example: Run the sample.sh on 01-Jan-2009, 01-Apr-2009, 01-Jul-2009, 01-Oct-2009. Thanks in advance (4 Replies)
Discussion started by: apsprabhu
4 Replies

6. Shell Programming and Scripting

Job Scheduling Issue

Hi Guys, I am new to Unix, Please tell me how to schedule a job to be executed on saturday,sunday and on friday night 8:00 PM onwards. and also how to change the password of oracle user every year through unix? Please help me to resolve this issue... Regards, Mahesh Raghunandanan (1 Reply)
Discussion started by: mraghunandanan
1 Replies

7. Shell Programming and Scripting

Job Scheduling

I am working on UNIX AIX system, with Oracle OS. We are not supposed to use any tools to schedule our unix shell scripts. Basically we have to make use of Oracle tables and Shell scripts to manage dependencies, restartability, scheduling, parallelizing,etc. If anyone has worked/ is working... (4 Replies)
Discussion started by: singhabhijit
4 Replies

8. UNIX and Linux Applications

Job Scheduling

I am working on UNIX AIX system, with Oracle OS. We are not supposed to use any tools to schedule our unix shell scripts. Basically we have to make use of Oracle tables and Shell scripts to manage dependencies, restartability, scheduling, parallelizing,etc. If anyone has worked/ is working... (1 Reply)
Discussion started by: singhabhijit
1 Replies

9. UNIX for Advanced & Expert Users

cron job scheduling

Hi, How can I configure cron file , to execute a script on evey alternate saturdays ? I am using AIX 5.0 machine Thanks in advance Shihab (1 Reply)
Discussion started by: shihabvk
1 Replies

10. Shell Programming and Scripting

Job Scheduling

Hello, I want to know about job scheduling utilities available in unix. It should not be responsible just for starting the job like in case of cron but should also be able to handle the execution of jobs. Regards, Ritesh (1 Reply)
Discussion started by: turlapaty
1 Replies
Login or Register to Ask a Question