LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Schedule a task ! (https://www.linuxquestions.org/questions/linux-networking-3/schedule-a-task-295301/)

L1nuxbug 02-26-2005 08:26 PM

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?

nilleso 02-26-2005 08:52 PM

you mean not using cron?

a crontab entry is the usual way to achieve this functionality in *nix

tsphan 02-26-2005 09:04 PM

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

L1nuxbug 03-02-2005 11:11 AM

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

tsphan 03-02-2005 07:54 PM

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.


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