LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   executing a command at a certain time (http://www.linuxquestions.org/questions/programming-9/executing-a-command-at-a-certain-time-309904/)

pantera 04-05-2005 07:51 AM

executing a command at a certain time
 
hi
i would appericiate it if someone could tell me how to execute a command after a certain time in the command line
for ex
if i want to start my net browser after 10 minutes how can i do it ???
thanx

perfect_circle 04-05-2005 07:57 AM

Re: executing a command at a certain time
 
Quote:

Originally posted by pantera
hi
i would appericiate it if someone could tell me how to execute a command after a certain time in the command line
for ex
if i want to start my net browser after 10 minutes how can i do it ???
thanx

You may use the sleep command in a script or in command line

if you type in a console:
Code:

sleep 10m ; firefox
The sleep command will delay the console for 10 minutes and then it will execute firefox

*EDIT*

use s for seconds m for minutes h for hours and d for DAYS!!!!! :D

keefaz 04-05-2005 08:03 AM

use the at command
Code:

at now + 10 minutes
at> mozilla -display :0 &
<ctrl> + d

Note that the display has to be set

pantera 04-05-2005 08:06 AM

thanx........but i have another problem.......after running firefox i need to do the enter command.......
i mean after i execute the program it gives me a dialog where i have to press enter

keefaz 04-05-2005 08:13 AM

Is the dialog a profile selection dialog ? In this case, try add the -P <profile> option to firefox

pantera 04-05-2005 09:15 AM

no the thing is that i am using Ares software using wine emulator........but when ares starts i need to press enter to go to the main menu( cause it gives me a dialog box).........i want to do this cause i want to start the downloads after some time........

keefaz 04-05-2005 01:22 PM

Do you know wget or curl tools ? They work fine for download at command line = they are "scriptable"


All times are GMT -5. The time now is 02:08 AM.