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
I need a macro to run on specific dates at different times
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
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.
- 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?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
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
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
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
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.
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?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?