LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 08-12-2008, 06:20 PM   #1
jtag
Member
 
Registered: Aug 2008
Posts: 33

Rep: Reputation: 0
How to create an executable script that starts execution at a specific date and time?


How can I create an executable script that starts execution at a specific date and time (if is possible without rebooting the PC)?
 
Old 08-12-2008, 06:27 PM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
You can use the "at" command to schedule a one-time execution at an arbitrary date and time, or use cron to schedule a repeating execution.
 
Old 08-12-2008, 06:28 PM   #3
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
Create the script.
Locate it in some directory, such as /usr/local/bin
Add a crontab entry for the correct user: root's if root privs are needed
 
Old 08-12-2008, 09:36 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.6, Centos 5.10
Posts: 16,324

Rep: Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041Reputation: 2041
BTW, the default env inside cron (esp PATH) is minimal, so always provide the complete path to any cmd used eg don't just say

date

say

/bin/date

and so on for each cmd.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get file modification date/time in Bash script cmfarley19 Programming 13 12-21-2014 12:05 PM
Bash script to read file and alter lines depending on create date ChristianHein Linux - General 13 08-04-2007 06:39 AM
How to create a run-time executable from another exec + inputs? R00ts Linux - General 3 02-18-2006 05:52 PM
Start Date + Time Duration = End Date/Time calculator? ToBe Linux - General 3 09-26-2005 11:17 AM


All times are GMT -5. The time now is 01:39 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration