Hi, everyone. I have 4 module which was built to exe. The things i need now is count how much time of one module works, if it works more 40 sec, we will repeat all the process of 4 module.
For example: i have module A, B, C , D
Each module can run 10-20 sec (but in the case any module meet problems, it will run more 40 sec)
I run A -> B -> C -> D
Assume that I am running at B module and it meet problems , it run more 40 sec. All the process will be stopped and repeat A->B->C->D again/
I cannot find any threads on this forums which is mentioned about it ? Hope you guys can help me figure out this problem !!
How to count the timeout of a command ?
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: How to count the timeout of a command ?
I think to do this you would need another compiled macro running at the same time which could be launched asynchronously with the Run command. This would set up a loop which checks the existence of the compiled macro .exe you want to monitor (using ProcessExists>) and checks the elapsed time (using Timer>) and decides what to do - it could KillProcess and then launch something else for example.
So in other words you need a controlling macro which runs the macro you want to monitor, it can start that macro .exe asynchronously and then monitor how long it is running for ....
Does that make sense?
So in other words you need a controlling macro which runs the macro you want to monitor, it can start that macro .exe asynchronously and then monitor how long it is running for ....
Does that make sense?
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?
Re: How to count the timeout of a command ?
Thank you Marcus, It worked perfect. But it gave me a little bit trying about Timer.
After timer is divided 1000 as this:
Let>clip=(%endTime%-%startTime%)/1000
It will return to a string value, not interchangeable to integer when you make a comparison because the value will be returned at "xxx,xxx" not "xxx.xxx"
And have you developed "Objective Oriented" in Macro Scheduler ? I wanna use Class to make everything to simpler and easy to access ?
After timer is divided 1000 as this:
Let>clip=(%endTime%-%startTime%)/1000
It will return to a string value, not interchangeable to integer when you make a comparison because the value will be returned at "xxx,xxx" not "xxx.xxx"
And have you developed "Objective Oriented" in Macro Scheduler ? I wanna use Class to make everything to simpler and easy to access ?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: How to count the timeout of a command ?
That's bad syntax. You can do:
Let>clip={(%endTime%-%startTime%)/1000}
Or, break it apart:
Let>clip=endTime-startTime
Let>clip=clip/1000
Let>clip={(%endTime%-%startTime%)/1000}
Or, break it apart:
Let>clip=endTime-startTime
Let>clip=clip/1000
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?