?
Solved

Changing times of 'at' jobs

Posted on 2003-11-05
3
Medium Priority
?
678 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

Question has a verified solution.

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

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.:

771 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