I want to be able to run 5 scripts for example. I want them to run in order, one after the other, so that only one is running at any one time.
Is there a way to do this in Macro Scheduler?
How to run scripts one after another
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Just use the Macro> command at the end of each macro.
Note that the newest versions require the full path of the macro filename.
=====================
From the Help:
Macro>file_name [/variable=value|variable [/variable=value|variable] ... ]
Executes another script file. file_name must be a filename of a macro file. For macros that appear in Macro Scheduler's control panel, add '.scp' to the end of the macro name. It is also advisable to specify the full path should the path change during the execution of the calling macro.
To pass values to the macro specify each one after a / character. The variable name given should exist in the script to be run. The value to assign to that variable is specified after the = character.
If the calling macro has a log file the script being called with the Macro command will log to the same log file. You can override this using the /LOGFILE parameter to set a log file for the sub macro.
Abbreviation : Mac
Examples
Macro>Defragment Disk.scp
Macro>C:\MyFolders\MSmacros\MyMoveFile.scp /source=c:\temp\myfile.bat /destination=c:\temp\myfile.bak
====================
Hope this helps.......good luck
Note that the newest versions require the full path of the macro filename.
=====================
From the Help:
Macro>file_name [/variable=value|variable [/variable=value|variable] ... ]
Executes another script file. file_name must be a filename of a macro file. For macros that appear in Macro Scheduler's control panel, add '.scp' to the end of the macro name. It is also advisable to specify the full path should the path change during the execution of the calling macro.
To pass values to the macro specify each one after a / character. The variable name given should exist in the script to be run. The value to assign to that variable is specified after the = character.
If the calling macro has a log file the script being called with the Macro command will log to the same log file. You can override this using the /LOGFILE parameter to set a log file for the sub macro.
Abbreviation : Mac
Examples
Macro>Defragment Disk.scp
Macro>C:\MyFolders\MSmacros\MyMoveFile.scp /source=c:\temp\myfile.bat /destination=c:\temp\myfile.bak
====================
Hope this helps.......good luck
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
You wrote:
Part of the decision process for the IF condition could be reading from an ini file that is written to as the various parts of the macro are processed.
If you can verbalize the decisions, then you cam make manually them and you can create the IF conditions to do the same thing.
Merry macroing......
Instead of just adding Macro> at the end of the script, use some IF> statements to select from multiple choices of Macro>.it will make it a little difficult to change the order of the scripts.
Part of the decision process for the IF condition could be reading from an ini file that is written to as the various parts of the macro are processed.
If you can verbalize the decisions, then you cam make manually them and you can create the IF conditions to do the same thing.
Merry macroing......
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!