Create EXE that Persists

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
bmelendy
Newbie
Posts: 17
Joined: Tue Jun 03, 2008 3:56 pm
Contact:

Create EXE that Persists

Post by bmelendy » Wed Feb 29, 2012 6:55 pm

Hello,
I've looked in the help and searched the forum but can't find an answer to this. How can I create an EXE that will continue to stay in memory and perform its actions? I have a script that is scheduled to run every 5 minutes, but when I create the EXE it only runs once and then exits memory? Thanks for any help, running version 10 Pro.

User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Mon Mar 19, 2012 11:30 am

Please post your code (or at least the relevant parts of it).

Maybe someone will be able to help if they can actually see what you are trying to do.
Phil Pendlebury - Linktree

bmelendy
Newbie
Posts: 17
Joined: Tue Jun 03, 2008 3:56 pm
Contact:

Post by bmelendy » Mon Mar 19, 2012 5:29 pm

Here is my script:

IfFileExists>D:\backup\ui_tax_manual_new.zip,EXTRACT,NOTHING
Label>EXTRACT
Run Program>D:\batch\Copy.Tax.Manual.to.Prod.cmd
wait>20
ReadFile>D:\backup\taxmanup.log,taxmanup
Let>SENDMAIL_STATUS=1
Let>subject=Tax Manual Copied to Production
Let>me=[email protected]
Let>myname=RoboProd
Let>recipients=[email protected]
Let>body=taxmanup
SMTPSendMail>recipients,emp1.emp.state.or.us,me,myname,subject,body,
Label>NOTHING

What this doesn't show are the settings for the script to run daily every 5 minutes continuously. However, when I create my EXE and run it, it just executes one time. Why isn't it staying in memory and executing these steps every 5 minutes?

Could it be that when you create an EXE with Macro scheduler that the settings for when to run don't get exported into the EXE you are creating? Thanks again for any feedback.

...Brad

User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Mon Mar 19, 2012 5:40 pm

There are a few ways to do this but quickest fix: Simply put your script in a loop.

Code: Select all


//////////////////////
Label>START
//////////////////////
IfFileExists>D:\backup\ui_tax_manual_new.zip,EXTRACT,NOTHING
Label>EXTRACT
Run Program>D:\batch\Copy.Tax.Manual.to.Prod.cmd
wait>20
ReadFile>D:\backup\taxmanup.log,taxmanup
Let>SENDMAIL_STATUS=1
Let>subject=Tax Manual Copied to Production
Let>[email protected]
Let>myname=RoboProd
Let>[email protected]
Let>body=taxmanup
SMTPSendMail>recipients,emp1.emp.state.or.us,me,myname,subject,body,
Label>NOTHING 
//////////////////////
// Change the wait to whatever you want in seconds.
Wait>300
GOTO>START
//////////////////////
PS highly recommend you upgrade to V13 asap.

:-)
Phil Pendlebury - Linktree

bmelendy
Newbie
Posts: 17
Joined: Tue Jun 03, 2008 3:56 pm
Contact:

Post by bmelendy » Mon Mar 19, 2012 5:57 pm

Thanks for the help. I was beginning to think I needed to just use a loop rather than relying on the EXE getting the time to run settings from macroscheduler.

User avatar
Phil Pendlebury
Automation Wizard
Posts: 543
Joined: Tue Jan 16, 2007 9:00 am
Contact:

Post by Phil Pendlebury » Thu Mar 22, 2012 5:31 pm

There you go.
Phil Pendlebury - Linktree

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