rahuljain Posted April 27, 2016 Report Share Posted April 27, 2016 I want to repeat a process with every five minut. it should use minut time from a specified other running program and that process should start at muiliple of 5 min Like i start system at 10.02 pm and process should start at 10.05 pm or 10.10 pm and should repeat at every 5 min interval 10.10...10.15...10.20...10.25...so on Plz help me how to program this Quote Link to comment Share on other sites More sharing options...
acantor Posted April 27, 2016 Report Share Posted April 27, 2016 I want to repeat a process with every five minut. it should use minut time from a specified other running program and that process should start at muiliple of 5 min Like i start system at 10.02 pm and process should start at 10.05 pm or 10.10 pm and should repeat at every 5 min interval 10.10...10.15...10.20...10.25...so on Plz help me how to program this Add a new script that is activated automatically on a schedule every five minutes: Quote Link to comment Share on other sites More sharing options...
rberq Posted April 28, 2016 Report Share Posted April 28, 2016 Schedule it to run like Alan said. But while it will run every five minutes, I think it will be five minutes from the last time it ran -- not necessarily right on the clock increments of 10:00, 10:05, 10:10, etc. If you want it to do stuff only at the five-minute marks, I recommend you schedule it to run every minute, and at the beginning of the macro find out the time (minute) like this: Variable Set Integer %N1% from Current Minute Then check N1 and if it is NOT 00, 05, 10, ... 55 return from the macro without doing anything further. This technique should make it do its work only on the proper minutes, but still I don't think it will run EXACTLY at the beginning of each minute (00 seconds). If you need that, we can probably come up with a refinement to do it. Be sure to go to Options / Preferences / Scheduler and set it check at increments smaller than 60 seconds. Quote Link to comment Share on other sites More sharing options...
rahuljain Posted April 28, 2016 Author Report Share Posted April 28, 2016 Thks alan and rberq i think this could help me to solve my problem But one more thing left how could i read time from other program running at system I dont want to use system time so that i can backtest any process runing in that program..... 1 Quote Link to comment Share on other sites More sharing options...
rberq Posted April 28, 2016 Report Share Posted April 28, 2016 What program do you want to read the time from? If it is a program you wrote, you could modify it to put out a file with the time, and your macro could access the file. For testing, use Notepad to make a .txt file containing a time and have the macro read that file. From your other program you could also launch meproc.exe or macexp.exe with the /A or /MXE options to run a macro whenever the program wants the macro to run. See Help screens. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.