Jump to content
UBot Underground

[Free] Run Bots Automatically On Schedule


Recommended Posts

Hi.

 

I was looking for an easy method to run my bots with different configurations and on schedule.

Previously my bot was running 24x7. I had a loop in my bot and started the task every couple of hours. Between those runs the bot was still active but idling.

 

I had some stability and availability issues on my main server. So my idea was to start the bots only when they are needed. 

One of my requirements was, to be able to run the same bot with different configurations. 

 

So here's what I'm doing. 

 

I'm using the great (FREE) Commandline Plugin:

http://www.ubotstudio.com/forum/index.php?/topic/15663-free-plugin-command-line-arguments/

 

That allows me to start my bot via

bot.exe /auto parameter1 parameter2 ...

 

Now my bot can react depending on the parameters I sent to the bot. 

 

Here's a quick code example:

 

on load("Bot Loaded") {

    plugin command("Command Line Arguments.dll""command line arguments list"%cparameters)
    if($comparison($list item(%cparameters,1),"=","/auto")) {
        then {
            set(#folder,$list item(%cparameters,2),"Global")
        }
        else {
            set(#folder,$special folder("Application"),"Global")
        }
    }
    create folder(#folder,"tmp")
}

 

And at the beginning of my bot I have something like:
RunWithCommandline()
stop script

This calls a special define where I control the behavior of the bot when it's launched via /auto. 
The important thing here is, that you don't have any alerts or something that is waiting for user input. Because then your bot will not finish and close.

 

Now I use a free Windows Tool to schedule my bots:

http://www.freebyte.com/fbtaskscheduler/

 

 

You could also use the Windows task scheduler to configure everything. 

The windows task schedule has the advantage, that you could logoff from the PC, and the task scheduler would still be able to run the bot (if configured correctly).

 

But the Freebyte software is a lot easier to setup and configure in my opinion.

 

You could setup it like this:

freeschedule.JPG

 

The /auto option will automatically launch your bot. Tested it with 5.5.12 and it's working fine.


Another alternative task manager (with more options) is:
http://www.splinterware.com/products/wincron.htm

 

 

Hope this helps someone.

 

Cheers

Dan

  • Like 2
Link to post
Share on other sites
  • 2 weeks later...
  • 2 months later...

Thanks Dan.

Seems a very good method to run bots on schedule.

 

But I have a problem.

My bot starts on the schedule time, but it is waiting for me to click on the RUN command. Although there are no options for user inputs or alert boxes, it still waits for me to click on the RUN button.

 

How can I make it run without clicking on the RUN button?

Link to post
Share on other sites

Thanks Dan.

Seems a very good method to run bots on schedule.

 

But I have a problem.

My bot starts on the schedule time, but it is waiting for me to click on the RUN command. Although there are no options for user inputs or alert boxes, it still waits for me to click on the RUN button.

 

How can I make it run without clicking on the RUN button?

 

You have to start the bot with parameter /auto

 

Dan

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...