LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-18-2010, 04:09 PM   #1
winairmvs
Member
 
Registered: Aug 2009
Posts: 42

Rep: Reputation: 16
Run script once at certain date and time


I was wondering if anyone has discovered a way of either using cron or by custom scripting, to run a script at a certain date and time only once. The purpose would be to make one-off changes to dns zone files, or to virtual host configs on an apache server, or changing any type of text file at say 12:01am rather than waking up at 12:01am (when our maintenance windows start) to make changes to production servers.

Thanks!
 
Old 03-18-2010, 04:12 PM   #2
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 97
man at
Code:
at task -v 12:01

Last edited by troop; 03-18-2010 at 04:13 PM.
 
Old 03-18-2010, 04:17 PM   #3
winairmvs
Member
 
Registered: Aug 2009
Posts: 42

Original Poster
Rep: Reputation: 16
Lightbulb

Well nevermind, it seems the command 'at' and 'batch' can accomplish just about everything I am looking for.

Last edited by winairmvs; 03-18-2010 at 04:22 PM.
 
Old 03-18-2010, 04:22 PM   #4
winairmvs
Member
 
Registered: Aug 2009
Posts: 42

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by troop View Post
man at
Code:
at task -v 12:01
After reading the man page I did not see anything about how to cancel a scheduled task. Is there a way to cancel the an 'at' task?
 
Old 03-18-2010, 05:04 PM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by winairmvs View Post
After reading the man page I did not see anything about how to cancel a scheduled task. Is there a way to cancel the an 'at' task?
The command is atrm. It should be listed and described together with at and atq in the mentioned manual page.

These articles should give some insight about scheduling jobs in Linux:
http://www.linuxjournal.com/article/4087
http://www.ibm.com/developerworks/li...cheduling.html

Last edited by colucix; 03-18-2010 at 05:14 PM. Reason: Added some advice for reading.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Get file modification date/time in Bash script cmfarley19 Programming 16 04-15-2015 06:25 PM
SUDo to run at particular date and time sharma.kashyap Linux - Security 4 03-04-2009 10:00 PM
Using sed in a shell script to add date and time seefor Programming 3 02-25-2009 01:21 PM
Shell Script - Date/Time runnerpaul Programming 9 08-20-2008 07:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration