1 hour macro timeout limit

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
jmorchard
Posts: 3
Joined: Thu Mar 14, 2019 10:03 pm

1 hour macro timeout limit

Post by jmorchard » Thu Mar 14, 2019 10:18 pm

We currently have iMacros [*Scripting Edition*]. We are calling macros from a script but the iMacros jobs we are running processes business related tasks (accounting, commissions, etc..) on an internal website. My problem is, those tasks can run several hours and iMacros just stops at exactly 1 hour and proceeds to the next step unless I manually pause it. I need a way for this to either check for a completion file before continuing or just increase that 1 hour timeout. Every timout setting I have found or searched for online discusses page timeouts and everything mentioned is based on seconds for a page to load. I need a way to increase whatever timeout ends my macro at the 1 HOUR mark. How do I make a macro run over 1 hour?? And for those that insist on trolling, I searched for many hours before resorting to posting this and am new here and new to iMacros (the person who knew all this left the company and I am stuck fixing everything) so if it is posted to the wrong place or been answered 100 times, Sorry!? Please be gentle and use small words :wink:
chivracq
Posts: 8781
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: 1 hour macro timeout limit

Post by chivracq » Thu Mar 14, 2019 11:02 pm

jmorchard wrote:
Thu Mar 14, 2019 10:18 pm
We currently have iMacros [*Scripting Edition*]. We are calling macros from a script but the iMacros jobs we are running processes business related tasks (accounting, commissions, etc..) on an internal website. My problem is, those tasks can run several hours and iMacros just stops at exactly 1 hour and proceeds to the next step unless I manually pause it. I need a way for this to either check for a completion file before continuing or just increase that 1 hour timeout. Every timout setting I have found or searched for online discusses page timeouts and everything mentioned is based on seconds for a page to load. I need a way to increase whatever timeout ends my macro at the 1 HOUR mark. How do I make a macro run over 1 hour?? And for those that insist on trolling, I searched for many hours before resorting to posting this and am new here and new to iMacros (the person who knew all this left the company and I am stuck fixing everything) so if it is posted to the wrong place or been answered 100 times, Sorry!? Please be gentle and use small words :wink:
Wrong Sub-Forum indeed, your Qt is not specific (nor even related) to the 'Scripting Interface', your Thread will probably be moved to the 'General' Sub-Forum... (No need to open a Duplicate...)

FCIM...! :mrgreen: (Read my Sig...)

But OK, all Browsers and all Versions all support the same '!TIMEOUT_xxx' Commands.
Have a look at the '!TIMEOUT_MACRO' Command maybe, I would think...
But hum, it all depends a bit on what exactly you mean by "next step" in "... and proceeds to the next step unless I manually pause it." and how your overall Workflow is "organized"... For '!TIMEOUT_MACRO' to be "relevant", I interpreted "next step" as "next Macro" called by the next 'iimPlay()' Command in your main Script. If you meant "the next Line" in the same '.iim' Macro, then you must have some '!TIMEOUT_PAGE' or '!TIMEOUT_STEP' Command in place at that moment in your '.iim' Macro. (And depending on your FCI, those 2 Commands used to be called '!TIMEOUT' and '!TIMEOUT_TAG'...)

And I don't see any Default Value mentioned in the Wiki, although I remember seeing one mentioned somewhere, but I've never hit it (I think...!?), even if some of my Scripts are pretty long (the longest one at this moment that I run regularly has about 12,500 Lines and contains a few 'PROMPT''s that I don't always 'OK' click right away, but the Script will simply wait...).
Even during the Beta Testing Phase for v10.0.2 for FF, I was using a 5000 Line Script that normally runs in 20-30 Min but would take 2-3 Hours in that Beta Version, and it never hit any Macro Timeout Limit.

All the '!TIMEOUT_xxx' Commands are in Seconds indeed, and 3600 Sec = 1 Hour, but you can use much higher Values if you want...
There is one Thread on the Forum where I once had done some "Testing" about the Limit for '!TIMEOUT_STEP' which turned out to be 2^16 or 2^32 rather I guess, that was good for many 1000's of years, ah-ah...! That should be long enough for you, I reckon...! 8)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
jmorchard
Posts: 3
Joined: Thu Mar 14, 2019 10:03 pm

Re: 1 hour macro timeout limit

Post by jmorchard » Fri Mar 15, 2019 3:13 am

Thanks for the move :)
well I think I just answered all of my questions. Looking up the info you requested I come up with

iMacros version 5.20 (build: 131) (yep only 7 versions behind that's good right?)
Image Recognition 4.301
IE version 6.1.76???? (really :? fml)
and um Windows XP 6.1 (build 760) Service pack 1 (its actually server 2008 R2 standard).

So long past needing to upgrade. I tried the !Timeout_Macro and it said unknown command lol
Not that it matters now apparently until we get with the 19th century but here is what we are using:

VERSION BUILD=4020412
SET !TIMEOUT 6880
SET !ERRORMACRO Error-Rpt
SET !DATASOURCE currentdate.txt
CMDLINE !DATASOURCE currentdate.txt
WAIT SECONDS=2
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://somewherenotsofun:9092/
SIZE X=1132 Y=810
STOPWATCH ID=total
STOPWATCH ID=Batch
TAG POS=1 TYPE=A ATTR=TXT:name=Batch
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/InvokeAction//lc%2Ecom%3Aname%3DBatch/action=processDailyBatch ATTR=NAME:p1+java.lang.String CONTENT={{currentyear}}/{{currentmonth}}/{{currentday}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/InvokeAction//lc%2Ecom%3Aname%3DBatch/action=processDailyBatch ATTR=NAME:p2+java.lang.String CONTENT=All
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/InvokeAction//lc%2Ecom%3Aname%3DBatch/action=processDailyBatch ATTR=NAME:p4+java.lang.String CONTENT=username
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/InvokeAction//lc%2Ecom%3Aname%3DBatch/action=processDailyBatch ATTR=NAME:p5+java.lang.String CONTENT=password
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/InvokeAction//lc%2Ecom%3Aname%3DBatch/action=processDailyBatch ATTR=NAME:p6+java.lang.String CONTENT=SYNCHRONOUS
TAG POS=1 TYPE=INPUT:RADIO FORM=ACTION:/InvokeAction//lc%2Ecom%3Aname%3DBatch/action=processDailyBatch ATTR=NAME:p7+boolean&&VALUE:false CONTENT=false
WAIT SECONDS=3
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/InvokeAction//lc%2Ecom%3Aname%3DBatch/action=processDailyBatch ATTR=NAME:action&&VALUE:processDailyBatch
TAG POS=1 TYPE=* ATTR=TXT:*BATCH_PROCESSING_NOT_ALLOWED* CONTENT=EVENT:FAIL_IF_FOUND
TAG POS=1 TYPE=* ATTR=TXT:*The<SP>operation<SP>returned<SP>with<SP>no<SP>value.* CONTENT=EVENT:FAIL_IF_FOUND
STOPWATCH ID=Batch


There are several of these almost identical in one macro and each one of these jobs runs a random amount of time. As business grows, they are running longer than an hour at which point the macro just automatically moves on to the next step without waiting for the first job to finish. Sadly, using software from 1802 doesn't help since most of the commands don't work for me but if you have a suggestion to get us by until I can convince someone that dinosaurs are dead and not coming back... I would greatly appreciate any advice (besides the obvious upgrading to this decade because only God himself knows how long that's going to take)
chivracq
Posts: 8781
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: 1 hour macro timeout limit

Post by chivracq » Fri Mar 15, 2019 4:04 am

jmorchard wrote:
Fri Mar 15, 2019 3:13 am
Thanks for the move :)
well I think I just answered all of my questions. Looking up the info you requested I come up with

iMacros version 5.20 (build: 131) (yep only 7 versions behind that's good right?)
Image Recognition 4.301
IE version 6.1.76???? (really :? fml)
and um Windows XP 6.1 (build 760) Service pack 1 (its actually server 2008 R2 standard).

So long past needing to upgrade. I tried the !Timeout_Macro and it said unknown command lol
Not that it matters now apparently until we get with the 19th century but here is what we are using:

Code: Select all

VERSION BUILD=4020412     
SET !TIMEOUT 6880  
SET !ERRORMACRO Error-Rpt     
SET !DATASOURCE currentdate.txt   
CMDLINE !DATASOURCE currentdate.txt  
WAIT SECONDS=2     
TAB T=1     
TAB CLOSEALLOTHERS     
URL GOTO=http://somewherenotsofun:9092/ 
SIZE X=1132 Y=810    
STOPWATCH ID=total
STOPWATCH ID=Batch 
TAG POS=1 TYPE=A ATTR=TXT:name=Batch   
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/InvokeAction//lc%2Ecom%3Aname%3DBatch/action=processDailyBatch ATTR=NAME:p1+java.lang.String CONTENT={{currentyear}}/{{currentmonth}}/{{currentday}} 
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/InvokeAction//lc%2Ecom%3Aname%3DBatch/action=processDailyBatch ATTR=NAME:p2+java.lang.String CONTENT=All 
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/InvokeAction//lc%2Ecom%3Aname%3DBatch/action=processDailyBatch ATTR=NAME:p4+java.lang.String CONTENT=username 
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/InvokeAction//lc%2Ecom%3Aname%3DBatch/action=processDailyBatch ATTR=NAME:p5+java.lang.String CONTENT=password 
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/InvokeAction//lc%2Ecom%3Aname%3DBatch/action=processDailyBatch ATTR=NAME:p6+java.lang.String CONTENT=SYNCHRONOUS 
TAG POS=1 TYPE=INPUT:RADIO FORM=ACTION:/InvokeAction//lc%2Ecom%3Aname%3DBatch/action=processDailyBatch ATTR=NAME:p7+boolean&&VALUE:false CONTENT=false 
WAIT SECONDS=3
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/InvokeAction//lc%2Ecom%3Aname%3DBatch/action=processDailyBatch ATTR=NAME:action&&VALUE:processDailyBatch
TAG POS=1 TYPE=* ATTR=TXT:*BATCH_PROCESSING_NOT_ALLOWED* CONTENT=EVENT:FAIL_IF_FOUND
TAG POS=1 TYPE=* ATTR=TXT:*The<SP>operation<SP>returned<SP>with<SP>no<SP>value.* CONTENT=EVENT:FAIL_IF_FOUND
STOPWATCH ID=Batch
There are several of these almost identical in one macro and each one of these jobs runs a random amount of time. As business grows, they are running longer than an hour at which point the macro just automatically moves on to the next step without waiting for the first job to finish. Sadly, using software from 1802 doesn't help since most of the commands don't work for me but if you have a suggestion to get us by until I can convince someone that dinosaurs are dead and not coming back... I would greatly appreciate any advice (besides the obvious upgrading to this decade because only God himself knows how long that's going to take)
Ah-ah-ah...!, oh jeez...! That's a Dinosaur Script and FCI indeed...! :shock:

Never seen this '!ERRORMACRO' Command before, hum deprecated since 2008, ah-ah...! Hum, pity it is not (backward) supported anymore and doesn't work anymore in the Version I use myself (v8.8.2 for FF), which is also quite old, as this could give some powerful Functionality and could (have) be(en) a Workaround for some other Functionality/Syntax (to call another Macro) that is now broken in the later v10.x for FF/CR Versions...

But I like it, don't worry...! 8)

Hum, OK, I had a few Qt's and Suggs and possible Workarounds, but maybe not needed, as I think I might have a quicker Solution... :P

I see you only have a '!TIMEOUT'=6880 Statement, which is probably for the 'SUBMIT' Button, but your Script doesn't contain any '!TIMEOUT_TAG' Statement(s), which means that '!TIMEOUT_TAG' then defaults to 6880/10=688 Sec which is about 11 Min.
=> Try adding some '!TIMEOUT_TAG'=3000 for example...:

Code: Select all

VERSION BUILD=4020412     
SET !TIMEOUT 6880  
SET !TIMEOUT_TAG 3000
SET !ERRORMACRO Error-Rpt     
'SET !DATASOURCE currentdate.txt   
CMDLINE !DATASOURCE currentdate.txt  
WAIT SECONDS=2     
TAB T=1     
TAB CLOSEALLOTHERS     
URL GOTO=http://somewherenotsofun:9092/ 
[... Etc...]
The '!TIMEOUT'=6880 was already >>3600, so if there is indeed some '!TIMEOUT_MACRO' Default Value still playing a role, we would need to ask TechSup if some similar Command existed already in your Version and which Name it had...

And hum, 11 Min doesn't really correspond to your "1 Hour"... :o

OK, see if that helps already..., or I'll mention my other Suggs and Workarounds, that will involve splitting your whole Macro into smaller Bunches, controlled from a main ('.vbs' probably) Script. :oops:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
jmorchard
Posts: 3
Joined: Thu Mar 14, 2019 10:03 pm

Re: 1 hour macro timeout limit

Post by jmorchard » Fri Mar 15, 2019 10:17 pm

Sadly I already have it broken into 3 pieces and they notified me the other day it will have to be in at least 3 more pieces (least I hope they meant total and not 3 for each piece :shock: ). I have PowerShell launching iMacros then watching for a completion file which in turn launches the next step but with anything in life the more pieces there are the more likely something is going to break. So after the macro times out, it will exit iMacros completely and then Powershell waits, then launches iMacros again for steps 2, and 3. I just thought removing the one hour limit would be the better choice but now see why A)he quit :lol: B)they want it split more instead of fixing the problem :oops:.
I do not think that !ERRORMACRO actually does anything. There is no macro anywhere by that name and no logs that get updated so who knows, maybe as I dig into things I will find it serves a purpose.

Thanks for all your advice! My next mission will obviously be to convince the powers that be to move up maybe just a few versions and idk maybe have support since it is production and business stops without it :cry:. Oh btw !TIMEOUT_TAG = error: unknown command :roll: lol
Post Reply