![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
|
starting programs at a specific time
Hi all silly question but how do i can start a program at a specific time?For example start firefox at 5:00 am?(no crontab)
|
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: May 2005
Location: Bad Nauheim, Germany
Posts: 436
Rep Power: 4
![]() |
Login on at 4:49, and type the following in a console window: "firefox &"
Then wait for the clock to strike 5. ![]() Why can't you use the crontab, and why do you want to start an interactive program automatically?
__________________
-Steven "Is this a piece of your brain?" - Basil Fawlty |
|
|
|
|
|
#3 |
|
Programming Guru
![]() ![]() ![]() |
kinda curious as to why you can't (don't want to) use crontab also... maybe the 'at' command will work.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#4 |
|
Newbie
|
Well sorry but i supposed that i can't get work cron in bash scripts
|
|
|
|
|
|
#5 | |
|
Hobbyist Programmer
Join Date: May 2005
Location: ma
Posts: 130
Rep Power: 4
![]() |
Quote:
|
|
|
|
|
|
|
#6 | |
|
Newbie
Join Date: May 2006
Posts: 2
Rep Power: 0
![]() |
Quote:
@echo off
:start
for /f "tokens=1,2 delims= " %%a in ('time /t') do set time1=%%a%%b & ::gets the time into 00:00AA form
if %time1% ==10:34PM goto :ok
goto :start
:ok
:: what to do when time equals 5:00AM
echo what to do when it is 5:00 AM
pauseTell me how that works and tell me if you need more help ![]() |
|
|
|
|
|
|
#7 | |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Quote:
The "at" command can be used to make a script run at a particular time once. Cron can be used to make a script run repeatly at a particular time. Do you want firefox to run at 5:00am once, or every day? |
|
|
|
|
|
|
#8 |
|
Newbie
Join Date: May 2006
Posts: 2
Rep Power: 0
![]() |
I was just trying to help, I thout it was a typo or somthing, I have never herd of bash scripts.
|
|
|
|
|
|
#9 |
|
Expert Programmer
Join Date: Dec 2004
Posts: 794
Rep Power: 4
![]() |
bash is the most commonly used Linux shell.
__________________
Few people deserve to be compared to (Rush) Limbaugh, most of them were convicted at the Nuremburg trials. --WilliamSChips on Slashdot |
|
|
|
|
|
#10 |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
Make sure you have atd running (the at daemon), then it's as simple as:
at 05.00 at> firefox at> (ctrl+d) |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|