Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Timer: Run at Specified Time


  • Please log in to reply
5 replies to this topic
FeatherDaze
  • Members
  • 7 posts
  • Last active: Mar 30 2006 09:56 AM
  • Joined: 25 Mar 2006
I've searched the help files over and over and over.

I'm trying to write a script that will start running at a specified time.

Right now I'm using
Sleep, X

But I have to keep setting it depending on how long from when I run the script to when I want it to start running.

What I'm looking for is something that will start running at say 0700

Any help is much appreciated.

  • Guests
  • Last active:
  • Joined: --
Go to the help file and to index. Search for "settimer" and read that. It might be what you are looking for.

Micha
  • Members
  • 539 posts
  • Last active: Dec 31 2011 01:43 PM
  • Joined: 15 Nov 2005
Hi,
Windows has a task planner.
Open the control panel.
You will find a entry like task planner (sorry, I only have a german windows, therefore I cannot tell you the correct name)
You can create a new task.
As program select the script and adjust the desired starting time.

You can also use the search-func of this board. I'm sure I've read about the task planner here.

Ciao
Micha

FeatherDaze
  • Members
  • 7 posts
  • Last active: Mar 30 2006 09:56 AM
  • Joined: 25 Mar 2006

Go to the help file and to index. Search for "settimer" and read that. It might be what you are looking for.


I didn't see where that would work. But I guess I kinda hacked it. This is my test code. It kinda fills up memory but I will be AFK when this is running so it doesn't really matter.

Loop {
If A_Hour = 02 
{
If A_Min = 34
{
Run C:\Program Files\Mozilla Firefox\firefox.exe
Exit
}
}
}


BoBo
  • Guests
  • Last active:
  • Joined: --
SetTimer, Chronos, 500

Return



Chronos:

FormatTime, TimeToMeet,,HHmm

If TimeToMeet = 0234

{

   Run C:\Program Files\Mozilla Firefox\firefox.exe

   Exit

   }

Return
Untested. FYI. The "task planner" Micha mentioned above is named Scheduled Tasks in an UK/US OS.

BoBo
  • Guests
  • Last active:
  • Joined: --
#Persistent

SetTimer, Chronos, 500

Return 



Chronos: 

FormatTime, TimeToMeet,,HHmm 

If TimeToMeet = 1006 

{ 

   Run notepad

   ExitApp

   } 

Return
Tested&corrected. 8)