@ecstasy e56a2fe6-c9fd-49d2-a467-7a00cfa4b9ee-image.png
or
0f363970-78da-4e6b-a413-205352dc48fb-image.png
or
cf937ae9-54ea-44ba-9889-b09abf6e9522-image.png
Anyone knows how can I run a function in BAS every 30 minutes?
Appreciate it
@andrewem24 said in How can I run a function every 30 minutes?:
Anyone knows how can I run a function in BAS every 30 minutes?
Appreciate it
@sergerdn I'm looking for my program to work with no sleeping.
Right now It's running my function every 60 minutes using DATE Bas module. I just get current minute from DATE. So every hour at minute 6 it will run my function.
My problem is that 60 minutes it's too long and that's why i'm looking to run this function every 30 minutes give or take
For example at:
11:06 - it's running my function
12:06 - it's running my function
13:06 - it's running my function
14:06 - and so on
while ( true ) {
while( Date.now() < [[MF_TIME]] ) Sleep (1000);
[[MF_TIME]] = Date.now() + 30 * 60 * 1000;
MyFunction;
}
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.