LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 06: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, 06:57 AM   #2
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
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 07:00 AM.
 
Old 04-05-2005, 07:03 AM   #3
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
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, 07: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, 07:13 AM   #5
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Is the dialog a profile selection dialog ? In this case, try add the -P <profile> option to firefox
 
Old 04-05-2005, 08: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, 12:22 PM   #7
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

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


Reply



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

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

All times are GMT -5. The time now is 09:37 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
Open Source Consulting | Domain Registration