LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 02-26-2005, 09:26 PM   #1
L1nuxbug
Member
 
Registered: Feb 2004
Location: Quetta
Distribution: RedHat
Posts: 54

Rep: Reputation: 15
Schedule a task !


Hi guys..
any one can explain to me how to schedule a task for linux RH AS..
i want to schedule a command "wget ftp://....." afrer every 3 & half hours. so please tell me how to do it?

Last edited by L1nuxbug; 02-26-2005 at 09:30 PM.
 
Old 02-26-2005, 09:52 PM   #2
nilleso
Member
 
Registered: Nov 2004
Location: ON, CANADA
Distribution: ubuntu, RHAS, and other unmentionables
Posts: 372

Rep: Reputation: 31
you mean not using cron?

a crontab entry is the usual way to achieve this functionality in *nix
 
Old 02-26-2005, 10:04 PM   #3
tsphan
Member
 
Registered: Jan 2005
Location: Clackamas, Oregon, US
Distribution: Slackware 10.2
Posts: 154

Rep: Reputation: 30
you just have to edit your crontab

with a terminal, first go "crontab -e [user]" as root, for [user], put in a user
or just "crontab -e" if you're doing it for your own user that's non-root.

use this as an entry for you

*/30 */3 * * * wget ftp://.....

that should tell it to run "wget ftp://...." every 30th of a minute for the 3rd of every hour.

you should replace that "wget ftp://...." with the actual command
 
Old 03-02-2005, 12:11 PM   #4
L1nuxbug
Member
 
Registered: Feb 2004
Location: Quetta
Distribution: RedHat
Posts: 54

Original Poster
Rep: Reputation: 15
U mean i just have to edit that crontab file and write some timing and date i want to run that command at that specific time ???
and what if its not root user... its some user like non root privilages..
if u can please guide me how to use cron.. thanks
 
Old 03-02-2005, 08:54 PM   #5
tsphan
Member
 
Registered: Jan 2005
Location: Clackamas, Oregon, US
Distribution: Slackware 10.2
Posts: 154

Rep: Reputation: 30
crontab -e "youruser" will set command for your user at the schedule timing.

If the user is nonroot, it'll run the command as if it was the user, if the user is root, it'll run the command as root.

in order for crontab to work, you'll need crond loaded. If you can, set this up in your rc.local so it'll load up on startup.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to schedule *interactive* task with at or cron fast_rizwaan Linux - Newbie 4 09-09-2005 07:26 PM
crontab schedule help onlykims Linux - Newbie 2 08-28-2004 01:09 PM
Mandrake 10.1 Schedule is Up colnago Mandriva 0 03-25-2004 02:29 PM
Schedule, AGAIN!! erathomor Linux - General 0 04-11-2002 12:25 PM
HOW TO Schedule erathomor Linux - General 3 04-10-2002 02:57 PM


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