LinuxQuestions.org
Visit Jeremy's Blog.
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 04-05-2005, 07:51 AM   #1
pantera
Member
 
Registered: May 2004
Posts: 80

Rep: Reputation: 15
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
 
Old 04-05-2005, 07:57 AM   #2
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
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!!!!!

Last edited by perfect_circle; 04-05-2005 at 08:00 AM.
 
Old 04-05-2005, 08:03 AM   #3
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
use the at command
Code:
at now + 10 minutes
at> mozilla -display :0 &
<ctrl> + d
Note that the display has to be set
 
Old 04-05-2005, 08:06 AM   #4
pantera
Member
 
Registered: May 2004
Posts: 80

Original Poster
Rep: Reputation: 15
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
 
Old 04-05-2005, 08:13 AM   #5
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

Rep: Reputation: 136Reputation: 136
Is the dialog a profile selection dialog ? In this case, try add the -P <profile> option to firefox
 
Old 04-05-2005, 09:15 AM   #6
pantera
Member
 
Registered: May 2004
Posts: 80

Original Poster
Rep: Reputation: 15
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........
 
Old 04-05-2005, 01:22 PM   #7
keefaz
Senior Member
 
Registered: Mar 2004
Distribution: Slackware
Posts: 4,617

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


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
Executing an ftp command from vb6 mrobertson Programming 3 07-06-2005 04:42 PM
executing a time-triggered script leosuth Programming 7 06-02-2004 09:15 AM
executing from command line nodger Linux - Newbie 3 01-20-2004 11:30 AM
::Command Executing in Webmin:: XxAndyxX Linux - Software 0 03-07-2003 02:04 PM
Executing command lines in C/C++ ReverseLogic Programming 2 05-28-2002 03:08 PM


All times are GMT -5. The time now is 10:17 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