If you have multiple browser threads then you can add a date column in database for each account. When some action is finished then you can add 30 minutes to the date now and add it to the database of that particular account. Then add a check condition in the beginning of the thread which checks if the current date is less or greater than the database date. If it is greater that means there is still time left and then close that thread without opening browser.
Calling Different function in threads
-
@bogdan You cannot really run multiple functions "simultaneously within one thread". But you can instantiate the "seed" threads 1, 2, 3. In turn, they would each launch its own multithreaded (can be different) function. Each thread of a multithreaded function would be assigned a unique index. The seed threads and the function threads would be the same-level citizens in the common thread pool.
Does this answer what you wanted to ask?
-
@daemons You might be confused by the way the project is run in the Record mode. It's single-threaded only. You would not be able to observe thread index branching using this mode. You should use the Run mode to use all this. Piece together a simple demo project and use the Log action to see how it works in multiple threads.
-
@bogdan Hell, why not? "If you can't explain it simply, you don't understand it well enough"
I hate to be misunderstood ))
Here's a demo script for what you were asking 0_1519329231828_test05.xml
Make sure to launch in the Run mode. See the Log.
Pay attention to the "Thread spawning artifact" messages in the script. They are because of guards preventing surplus threads to be spawned. BAS always maintains the number of threads specified in the "Thread Number" parameter (next to script execution buttons in the Record mode) and so respawns more threads when previous ones terminated.
-
@bogdan A while back, I considered Ubot too, but chose to go with BAS. Only watched tutorials and read reviews, though. It still seems that BAS is much more powerful, FREE, extendable and well-maintained.
You might want to upvote my answers if you like, to help the BAS community.