LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-11-2004, 06:33 PM   #1
Rv5
Member
 
Registered: Sep 2003
Distribution: RedHat9
Posts: 114

Rep: Reputation: 15
One More ? Regarding at


ive looked through man and the net. can the at command be used to schedule a job more then once? or is it a one time only? what if i want to schedule a job to run every hour for the next 24 hours? i couldnt see how to use at for this, but at seems like it should be the way to go.
 
Old 09-11-2004, 06:38 PM   #2
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Have you checked cron?
 
Old 09-11-2004, 06:38 PM   #3
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 243Reputation: 243Reputation: 243
A little knowledge of vi may help...

crontab -e
<press a to go to edit mode>
0 * * * * /path/to/your/program
<type [ESC],[:wq]>

Then your program will run every hour

man 5 crontab for more infos
 
Old 09-12-2004, 12:35 AM   #4
Rv5
Member
 
Registered: Sep 2003
Distribution: RedHat9
Posts: 114

Original Poster
Rep: Reputation: 15
cron will be what i use next, but im trying to understand all that the at command can do.
 
Old 09-12-2004, 05:36 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.3, Oracle Linux, Mint
Posts: 9,716

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
As proud and cedrik already suggested, cron is better suited for repetitive tasks.

If you anyway insist using at, nothing forbids to reschedule the next execution from within you at job.
 
  


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



LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:21 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration