Jump to content

Run script automatically


Recommended Posts

I Have been looking for this everywhere and so as a last resort I decided to ask.

Is there a way to get a script to start automatically at a certain time each day?

Even if the anwser is no any feedback is aprreciated. I just need to find out if I can actually do it.

Thanks

Link to comment
Share on other sites

... or if you want your script to always run, but only do something at a specific time, use something like

#include <date.au3>
While 1
     Sleep(100)
     If _NowTime(4)="19:16" Then
          MsgBox(0,0,"It's time do do some work! This msgbox will self destruct in 10 sec...",10)
          While _NowTime(4)="19:16" ; <- wait for minute to pass before waiting for the next day, because if work takes less than a minute it would be executed more than once
               Sleep(100)
          WEnd
     EndIf
WEnd

Note that this waits for a specified minute instead of a specified second, because if machine is very busy, a specific second might be too short a frame to trigger. I found that out in my alarm clock script where I did something similar to the above... I waited for [alarm_hour]:[alarm_minute]:00, machine was busy at that second, and I was late for work that day :)

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...