Jump to content

Recommended Posts

Posted

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

Posted

Under Windows you can add a scheduled task

Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Posted

in the Windows command prompt type at /? and it will tell you how to do it.

If you are a gui kind of person, in the control panel there is "Scheduled Tasks"

Posted

... 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.

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
  • Recently Browsing   0 members

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