Solved

Changing times of 'at' jobs

Posted on 2003-11-05
3
671 Views
Last Modified: 2013-12-27
I have a requirement to sometimes change the times of scheduled 'at' jobs.

I notice the date/time the job is due to run is not stored in /var/spool/cron/atjobs/xxx and
I can't seem to find where this information is stored/derived.  I've run a truss on 'at -l', but that made me
none the wiser.

Is it even possible?

My other choices in are to:

1.  Delete and resubmit the job (This can be very messy because of the application generating the jobs)
2.  Use a different batch scheduling tool.

I don't want to go down the other paths until I've totally ruled out manipulating the at times directly.
0
Comment
Question by:Tintin
3 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 9691794
Sorry, I don't think you can modify the run time for an at-job, but you can remove it and then
restart it.

Unlike a cron job which is running at regular based, at job is a one off job start at the user
predefinded time.
0
 
LVL 4

Accepted Solution

by:
Otetelisanu earned 500 total points
ID: 9692429
[root@pluto:/db/ttest] at -f ./tt 1200am Nov 07
commands will be executed using /bin/ksh
job 1068159600.a at Fri Nov  7 00:00:00 2003

[root@pluto:/db/ttest] at -l
user = root     1068159600.a    Fri Nov  7 00:00:00 2003


1 Day 24x3600=86400 sec


If you make the 1068159600.a + 86400 you have 1 day later.


1068159600 + 86400 = 1068246000


[root@pluto:/var/spool/cron/atjobs] mv 1068159600.a  1068246000.a
[root@pluto:/var/spool/cron/atjobs] at -l
user = root     1068246000.a    Sat Nov  8 00:00:00 2003
[root@pluto:/var/spool/cron/atjobs]

This 1068159600 is the secondtime from Unix born.

If you change with n second is with this second later


0
 
LVL 48

Author Comment

by:Tintin
ID: 9696534
Thanks Otetelisanu.

I don't know why I didn't think of that.  I kept looking at the id numbers thinking they were simple sequence numbers.

Makes good sense now.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now