Help with script that submits jobs at a certain time.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help with script that submits jobs at a certain time.
# 1  
Old 04-25-2008
Help with script that submits jobs at a certain time.

Here's the line I type everyday.

Code:
echo  "submit daily 00559 00010 00011" | at 21:00

I dunno. I'm totally new to this. Basically I want this to be fool-proof for everyone else we've had people do things like:

subit daily 00559 00010 00011
submit daly 00559 00010 00011
Submit daily (no params)
submit daily 00559 00010 0001111

So I'm tired of seeing it messed up.. The company doesn't want it added to cron (don't ask long story)
# 2  
Old 04-25-2008
Submitting an at job from the previous job is a time-honored method, even if in this case it sounds like you would be bending the rules a little bit.

Code:
#!/bin/sh

submit daily 00559 00010 00011
sleep 300 # just in case
echo "$0" | at 21:00

You'd run this at 21:00 once, and then it should take care of itself (until management notices ...)

$0 is the name of the currently running script, and echoing it to "at" will schedule it to run again at 21:00, tomorrow if submitted after 21:00 (at least in my version of at).
# 3  
Old 04-25-2008
Quote:
Originally Posted by era
Code:
#!/bin/sh

submit daily 00559 00010 00011
sleep 300 # just in case
echo "$0" | at 21:00

You'd run this at 21:00 once, and then it should take care of itself (until management notices ...)
Yes, so could I do

Code:
#!/bin/sh
echo "submit daily 00559 00010 00011" | at 21:00
echo "Daily Submitted. Please verify the atlist for correct times/parameters"
atlist

This is for the other people that are sometimes on-call. I would like them to be able to just type "subdaily.sh" and it adds it to at without any room to make errors.

I'm pretty "good" with batch files so that's why there may be some errors in that... But I'm new to HP-UX and this system. The previous guy left one day and I've been trying to pick it up as best as I can.
# 4  
Old 04-25-2008
Well yes, if you still want it submitted by hand then that's a good solution.
# 5  
Old 04-25-2008
Quote:
Originally Posted by era
Well yes, if you still want it submitted by hand then that's a good solution.
Yes I don't want to automate it. Apparently that's a gigantic no-no with this system (I was all for cron since the params never change), but oh well thank you very much. Is there such a thing as +Rep on this board? I can't find it. But many + Rep on to you nonetheless.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Cron jobs not running on time

on linux redhat, ubuntu systems, what reason would there be for a cron job not running at exactly the time it was scheduled to run, everytime? meaning, if i put something in cron to run every 120 seconds (2 minutes), why is it that some times, i find that cron would sometimes run the job a few... (1 Reply)
Discussion started by: SkySmart
1 Replies

2. Shell Programming and Scripting

Shell script to run multiple jobs and it's dependent jobs

I have multiple jobs and each job dependent on other job. Each Job generates a log and If job completed successfully log file end's with JOB ENDED SUCCESSFULLY message and if it failed then it will end with JOB ENDED with FAILURE. I need an help how to start. Attaching the JOB dependency... (3 Replies)
Discussion started by: santoshkumarkal
3 Replies

3. UNIX for Dummies Questions & Answers

At jobs - created date and time

Hi, I'm running atq for a user and its showing 2 'at' jobs in the queue to start at a later time. > atq Is there any way i can find out the creation date/time of these jobs? and ideally what job created them and what script(s) they are going to run? All i can see is the job number and... (3 Replies)
Discussion started by: finn
3 Replies

4. Red Hat

Cron Jobs not running at scheduled time

I've scheduled few jobs using cron. But they are not running ..... What might be the possible reasons ?? Also tell me how to troubleshoot............. Please help me ....... Thanks in Advance. (2 Replies)
Discussion started by: vamshigvk475
2 Replies

5. Shell Programming and Scripting

Running Cron -- same time jobs

Hi Is it possible to run different cron jobs at the same time? It appears that when I run ones at 15 min granularity that they may prevent ones running later in the day. Should crons run at same time have impact on one another? (4 Replies)
Discussion started by: rob171171
4 Replies

6. Shell Programming and Scripting

waiting on jobs in bash, allowing limited parallel jobs at one time, and then for all to finish

Hello, I am running GNU bash, version 3.2.39(1)-release (x86_64-pc-linux-gnu). I have a specific question pertaining to waiting on jobs run in sub-shells, based on the max number of parallel processes I want to allow, and then wait... (1 Reply)
Discussion started by: srao
1 Replies

7. Shell Programming and Scripting

specific number jobs run at the same time

Hi, I have more that 100 jobs I can run background, if I want only 4 running at ther same time, how can I write a script to control it? Thanks peter (0 Replies)
Discussion started by: laopi
0 Replies

8. Shell Programming and Scripting

background jobs exit status and limit the number of jobs to run

i need to execute 5 jobs at a time in background and need to get the exit status of all the jobs i wrote small script below , i'm not sure this is right way to do it.any ideas please help. $cat run_job.ksh #!/usr/bin/ksh #################################### typeset -u SCHEMA_NAME=$1 ... (1 Reply)
Discussion started by: GrepMe
1 Replies

9. Shell Programming and Scripting

Overlapping(executing time) jobs in crontab

I do not have the luxery of a server that i can try on, so i had to post my qn here. Say i have two jobs in the cron table, the jobs are scheduled 2 mins apart. Assuming the first jobs does a lot of operations and takes > 2 mins. Will the second job be executed? Will Unix actually have a queue... (3 Replies)
Discussion started by: new2ss
3 Replies
Login or Register to Ask a Question