Solved

Changing times of 'at' jobs

Posted on 2003-11-05
3
673 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

786 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