Scheduling an EXE created by the Pro version

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
cgaston
Junior Coder
Posts: 24
Joined: Sat Jan 22, 2005 11:52 am
Location: Ottawa, Canada

Scheduling an EXE created by the Pro version

Post by cgaston » Mon Jan 24, 2005 2:06 am

Once I distribute an EXE to a PC where Macro Scheduler is not installed, is it possible to schedule it?

The docs seem to imply that scheduling must be performed against the source script (*.SCP)

Gaston,
Ottawa, Canada

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Mon Jan 24, 2005 3:21 am

Any schedules that were set up with Macro Scheduler when compiled are not carried over into the compiled EXE file.

Use the Windows Task Scheduler tools to schedule the EXE file that was compiled.

Macro Scheduler does not need to be installed on the machine with the EXE file..
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

cgaston
Junior Coder
Posts: 24
Joined: Sat Jan 22, 2005 11:52 am
Location: Ottawa, Canada

Post by cgaston » Mon Jan 24, 2005 1:37 pm

Thanks again Bob,

I was not aware that Windows included a scheduler. That makes my day!

Gaston.

OlgaFB
Pro Scripter
Posts: 58
Joined: Mon Nov 01, 2004 3:04 pm
Contact:

Post by OlgaFB » Mon Jan 24, 2005 1:48 pm

Hi,

Two points:

1. Windows Task Scheduler indeed exists, and best of it: you can programmatically assign a schedule to your program. I don't know exactly how to do it, but I know it's possible.

2. EVen though many people say Windows Task Scheduler is a good thing, I had some bad experiences with it: I had a program that I set up the WTS to run some very simple dialog-based programs (2 or 3, not together) every x minutes, and sometimes it run from the beginning, but stopped after restart, sometimes it run ok for days and then stopped (though I put attention, that if I edit the properties once more, it again starts to work) or sometimes our computer just stuck, and when we removed that scheduler task, it started to run more smoothly.

In short - there ARE some issues with it, so if you want a really reliable program, I'd not rely on WTS. The matter is also that if your program at your client's computer will not run because of the WTS problems, your client will not always think immediately that WTS is a problem...

Best,
Olga.

It's interesting that I encoutnered this topic, as I was going through exactly the same. I finally asked my friend (very experienced programmer) to write a C coded program as a scheduler, and he wrote it. If you're interested, PM me, and I will ask him - may be he can give or sell it to you as well.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Mon Jan 24, 2005 5:35 pm

You are not limited to Windows Task Scheduler. There are other scheduling products out there.

One that I like is Macro Scheduler. You can use Macro Scheduler with RunProgram to call up your EXE files.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Captive
Macro Veteran
Posts: 213
Joined: Sun Oct 20, 2002 8:37 pm
Location: Colorado, USA

Post by Captive » Mon Jan 24, 2005 5:43 pm

Bob Hansen wrote:One that I like is Macro Scheduler. You can use Macro Scheduler with RunProgram to call up your EXE files.
The very first line / criteria being:
Once I distribute an EXE to a PC where Macro Scheduler is not installed, is it possible to schedule it?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Mon Jan 24, 2005 5:57 pm

Point taken re original spec that MS not already installed, but maybe OlgaFB wants to use something else with her applications since she does not want to use Windows Task Scheduler. Can't always rely on a friend who is an experienced C programmer to provide code as a solution.

A Google search results in about 1,040,000 hits for "program scheduler".
Just wanted to help Macro Scheduler to come to the top.

Some people may think of MS only as a macro tool, but it can be used fine as a scheduling tool with just a single line of script. No friendly C programmer needed.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

cgaston
Junior Coder
Posts: 24
Joined: Sat Jan 22, 2005 11:52 am
Location: Ottawa, Canada

Post by cgaston » Mon Jan 24, 2005 11:49 pm

Interesting discussion.

I think that I will try by luck with WTS. However, I will keep an eye closely on it.

Thank you for the warning Olga.

Gaston.

User avatar
tony_smith
Pro Scripter
Posts: 70
Joined: Wed May 14, 2003 8:25 pm
Location: Vancouver BC Canada

Similar issue?

Post by tony_smith » Tue Jan 25, 2005 9:53 pm

I have what I believe is a similar issue...

I am running a compiled .NET application with command line switches and redirecting the output to a file.

This line within Msched will not work;

Run Program>EDISplit850.exe RawDataReport -rs=1/25/2005 > U:\Reports\Split\SRD.csv

A command (DOS) window opens for a second and the program returns an error code that indicates a command line error.

If I open a command window and run the following, it works;

EDISplit850.exe RawDataReport -rs=1/25/2005 > U:\Reports\Split\SRD.csv

A DOS-savvy friend gave me this work around. If I enter the following Msched command in my script, it works;

Run Program>CMD /c "EDISplit850 RawDataReport -rs=1/25/2005 > U:\Reports\Split\SRD.csv"

I don't know exactly how this makes things work.

Hope this helps someone digging in the future.

OlgaFB
Pro Scripter
Posts: 58
Joined: Mon Nov 01, 2004 3:04 pm
Contact:

Post by OlgaFB » Tue Jan 25, 2005 10:05 pm

thank you very much, Tony!

Amazing, this isn't related to our conversation, but it's exactly what I needed now!!! ;)

Best,
Olga.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Jan 25, 2005 10:29 pm

Your Run Program> was using a DOS redirection with the ">" character.

In order to use DOS tools you need to call the COMMAND.COM program.

CMD /c calls the command window and that allows you to use DOS commands and redirections ">" and "<" and pipe "|" characters.. The /c switch carries out the commands and then stops the command window.

Note:
In WIN9X systems you must use command vs. cmd. So if writing a macro for multi Win OS, you should put in the ability to use the correct command based on the OS..
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
tony_smith
Pro Scripter
Posts: 70
Joined: Wed May 14, 2003 8:25 pm
Location: Vancouver BC Canada

Post by tony_smith » Tue Jan 25, 2005 10:51 pm

Thanks Bob.

You know, I seldom make that distinction when trouble-shooting command lines from within Msched. I almost never send DOS switches or redirects; I read/write files using ReadLn and WriteLn. Mostly I code application switches within Msched and unconsciously think that I am sending a command-line as if in a command window and end up frustrated by my own hurry-up thinking. I wonder if I will remember this in a year from now.

As it is, I decided to throw the application back over the wall to the .NET programmers and they put in a file output option in fifteen minutes... another blow to my ego... Ugh!

Another DOS switch for me to remember... /k which leaves the window open and avoids.... "what was that?"

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