Jump to content
UBot Underground

UBot 5 /Auto not working?


Recommended Posts

Hi

 

I recently upgraded to UBot 5 from 4 and also from Pro to Developer.

 

I have a number of Ubots that I wrote in UBot 4 Pro that I initiate via a .bat file using the /Auto switch.

 

However, if I recompile those UBots using UBot 5 when they start instead of automatically running they sit there waiting for the Run command. Is there some knack to setting the compile settings so that they automatically run in a batch file that has the /Auto command?

 

This is the contents of my .bat file.

 

pushd C:\Users\martin\Documents\UbotStudio\Development

Start  SGProcessEndOfMonth.exe /auto

 

I have tried two different Ubots, one that was working okay but when I opened it in UBot 5 and recompiled and tried again instead of running it just sat there.

 

Any guidance would be appreciated.

 

Martin

 

 

Link to post
Share on other sites

I've heard back from Ubot support to say that Ubot 5 does not support the /Auto command from .bat files, instead I should be using the in-built scheduler, (not sure if that will work for me but I will give it a go), in the meantime I have reverted to version 4, but if Version 5 is working for Homer I will be interested.

Link to post
Share on other sites

Homer

 

Thanks for your clarification, to clarify what I was trying to do I was trying to initiate a complied Ubot using a Windows .bat file that I could schedule using the Windows Task Scheduler.

 

So for example I have a UBot exe that checks the status of a website every few minutes to see if there is a job that needs to be processed so I have a text batch file that contains the following:

 

pushd C:\Users\martin\Documents\UbotStudio\Development
Start /wait  SGProcessExportResults.exe /auto
 
In version 4 the SGProcessExportResults.exe would open and run, with version 5 it opens but does not run. As I now have the developer edition I can now use Edward_2's suggestion and use the onload to make it work in version 5.
 
The Windows Task Scheduler is quite sophisticated and I can schedule a task specifying that it only run between certain start/end times, but between those times it should repeat every hour. I haven't looked at it in detail but version 5's in-built scheduler may be sophisticated enough for me but even if it is the windows task scheduler can make the system cleaner as it is preventing the need for multiple processes running in hibernation, for example, if I had a ubot that I only wanted to run annually I don't really want the Ubot.exe hibernating for a year. Maybe that is just me though.   
Link to post
Share on other sites

Ahh, the only problem with using the onload method is that the executable never ends, just gets to the end of the script and waits, so it looks like it is either Version 5 and the in-built scheduler, or compile it using version 4, unless there is a way to force the executable to close.

Link to post
Share on other sites
  • 5 weeks later...
  • 1 month later...

I know this is late but you can setup a batch file and use a shell command to run the batch file to close the bot.

 

I think you are right that that is a work around, I think it sucks that the /auto functionality has been removed though. The /auto command was very useful and the new scheduling is good but doesn't always perform the same function. It is fine if the procedure is time dependent but not if the procedure is triggered by an event.

 

A quit process though should be an easy addition to include, surely that is something that is missing anyway that could be useful?

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...