I need a macro to run on specific dates at different times

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Alpha_AI
Pro Scripter
Posts: 61
Joined: Wed Sep 19, 2007 9:30 am

I need a macro to run on specific dates at different times

Post by Alpha_AI » Thu Jun 19, 2008 6:49 am

Hello,

I need to be able to write down which dates and times i want the macro to run and have it run on those dates. If this means having the application open every day testing to see if the current timedatestamp matches up with the one in the macro then thats fine. I want to set it and forget about it.

I believe its something to do with reading the clock. Anyone knows how?

Here is an example
run on
20/06/08 at 12:45pm
26/06/08 at 7:45pm
30/06/08 at 7:30pm

Thanks

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Jun 19, 2008 8:16 am

Taking the first one as an example I would:

- In Macro Properties under Run When check off EVERY day ..
- Set the run time to 12:45
- Set the macro to run on the 20th of each month
- Now we just need to make the macro check what month it is:

Month>mm
If>mm=06
..
.. your code here
..
Endif

So now the macro will only do "your code here" on the 20th June at 12:45.

You could further check the year using the Year> function in the same way but it's probably just as easy to disable the schedule after 20/06/08 unless you're likely to forget.

Do similar for the other dates/times.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Alpha_AI
Pro Scripter
Posts: 61
Joined: Wed Sep 19, 2007 9:30 am

Post by Alpha_AI » Thu Jun 19, 2008 5:44 pm

Hello,

Im not too sure if i explained it correctly but i need the macro to run when
either of those dates and times occur without me having to disable and renable for a different date.

So I set the dates in the code and I forget about it. When either of those dates and time that I have preprogrammed in occur, run macro. Setting the date and time in the macro properties wont do the trick unless there is a way to alter the macro properties in code.

Ben

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sun Jun 22, 2008 4:42 am

You could create macros which call your macro with:

Macro>%SCRIPT_DIR%\yourmacro.scp

Make one like this for each time/date combo and schedule as explained above.

Alternatively build one macro which runs continuously and checks the time and date itself.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts