Forcing script to restart periodically
Forum rules
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
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
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
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
Forcing script to restart periodically
I would like to force my script to restart periodically, as the macro inexplicably hangs at random points in its execution. I don't mind if it means restarting the controlling javascript file, or if there's simply a way to force-restart the call to the macro if no return value is received within a certain time.
Has anyone implemented this already?
Cheers
Nirius
Has anyone implemented this already?
Cheers
Nirius
-
- Posts: 1483
- Joined: Tue Jan 26, 2010 11:35 am
Re: Forcing script to restart periodically
Hi,
Well, I would suggest debugging the script in the first place, but otherwise you could've created another script that periodically kills the first one and starts it again.
Best regards,
Well, I would suggest debugging the script in the first place, but otherwise you could've created another script that periodically kills the first one and starts it again.
Best regards,
Daniel, iOpus Support
Re: Forcing script to restart periodically
Hi Daniel,
Thanks for your reply. Please could you provide me with the command / code that would enable one script to kill another?
The script in question is very simple:
SET !TIMEOUT_MACRO 300
TAB T=1
ONDIALOG POS=1 BUTTON=CLOSE
URL GOTO=http://www.amazon.com
WAIT SECONDS=5
TAB T=1
TAB CLOSEALLOTHERS
It sometimes hangs on the URL line, other times on the TAB CLOSEALLOTHERS line. I have other instances of firefox running on the same machine executing the same script in a loop. As this is a particularly simple script, and there is no pattern to the hang-point, could there a conflict where two firefox instances are reading the actual .iim file?
Cheers,
Nirius
Thanks for your reply. Please could you provide me with the command / code that would enable one script to kill another?
The script in question is very simple:
SET !TIMEOUT_MACRO 300
TAB T=1
ONDIALOG POS=1 BUTTON=CLOSE
URL GOTO=http://www.amazon.com
WAIT SECONDS=5
TAB T=1
TAB CLOSEALLOTHERS
It sometimes hangs on the URL line, other times on the TAB CLOSEALLOTHERS line. I have other instances of firefox running on the same machine executing the same script in a loop. As this is a particularly simple script, and there is no pattern to the hang-point, could there a conflict where two firefox instances are reading the actual .iim file?
Cheers,
Nirius
-
- Posts: 1483
- Joined: Tue Jan 26, 2010 11:35 am
Re: Forcing script to restart periodically
Hello Nirius,
I am sorry, I didn't mean there is an iMacros command that would kill a script. You would need to use a programming language for that.
On the second thought, you could use another approach: decrease the !TIMEOUT / !TIMEOUT_TAG in your macro, so that it doesn't hang, but end sooner and schedule it to run with Windows Scheduler or an equivalent every x minutes.
I am sorry, I didn't mean there is an iMacros command that would kill a script. You would need to use a programming language for that.
On the second thought, you could use another approach: decrease the !TIMEOUT / !TIMEOUT_TAG in your macro, so that it doesn't hang, but end sooner and schedule it to run with Windows Scheduler or an equivalent every x minutes.
Daniel, iOpus Support
Re: Forcing script to restart periodically
Thanks Daniel,
I am currently calling the iim script from a javascript file. Do you know the command I could use from javascript to force-kill the iimPlay() function after a certain period of time has elapsed?
Cheers
Nirius
I am currently calling the iim script from a javascript file. Do you know the command I could use from javascript to force-kill the iimPlay() function after a certain period of time has elapsed?
Cheers
Nirius
-
- Posts: 1483
- Joined: Tue Jan 26, 2010 11:35 am
Re: Forcing script to restart periodically
Hi,
I don't think there is one you can if you're running your Javascript in Firefox as then your permissions are quite limited. What about the other approach I suggested?
I don't think there is one you can if you're running your Javascript in Firefox as then your permissions are quite limited. What about the other approach I suggested?
Daniel, iOpus Support