Bots.Business - Help
  • Welcome
  • Getting started
  • Create bot from Google Table
  • App
    • Reset or Update Your Password
  • Commands
    • Answer
    • Aliases
    • Keyboard
    • Groups
    • Wait for answer
    • Auto Retry (AR)
  • Coding: BJS
    • Variables
    • Bot functions
    • Message broadcasting and editing
    • User functions
    • Properties
    • Always running commands
    • Error command: "!"
    • Lists
      • Migration from properties to list
    • Api functions
    • BB Admin functions
    • Admin Panel
    • Send HTTP request
    • Web App
    • Caching
    • Inline Bot
    • BJS Security
    • Good coding practices
    • Top errors
  • Git
    • Import bot from Git repository
    • Export bot to Git repository
    • Repository structure
    • File: bot.json
    • Automatic importing on Git push
  • Iterations. How to reduce theys?
  • Limitations
  • Cloud
  • Reports
  • Deep Linking - pass any params on Bot starting
  • How to link chat account with BB account?
  • BB Inspection
  • Protected bot
  • VS Code
  • How to...
  • Smart Bot
    • Overview
    • Lang File
    • SmartBot
    • SmartTasker
    • Amount Dialog
  • Libs
    • What it is - Libs?
    • Libs development
    • RefferalLib
    • ResourcesLib
    • Random
    • MembershipChecker (MCL)
    • Cooldown Lib
    • CurrencyConverter
    • Lang
    • TopBoardLib
    • QiwiPayments
    • Coinbase (CB)
    • CoinPayments (CP)
    • OxaPay
    • CryptoJS
    • CurrencyQuote
    • GoogleApp
    • GoogleTableSync
    • Guard
    • Webhooks lib
    • DateTimeFormat Lib
  • Store
    • BB Point Bot
    • Welcome bot
    • Help bot
    • SRB Demo Keyboard Tools
Powered by GitBook
On this page

Was this helpful?

  1. Commands

Auto Retry (AR)

PreviousWait for answerNextCoding: BJS

Last updated 1 year ago

Was this helpful?

Command can be run periodically. For example:

  • bot send every 24 hours

  • bot download web page every 1 hour and parse it. See our

Auto Retry spent 1 iteration on each run. Thus, if you put AR for once a minute (60 secs), it will be 1440 iterations per day.

So it is need set auto retry time:

  • for 10 minutes: 60*10 = 600 secs

  • for 1 hour: 60*60 = 3600 secs

  • for 24 hours: 60*60*24 = 86400 secs.

  • for 1 year: 86400 * 365 = 24966000 secs

Modify Auto Retry in app on command editing:

Handled only on BJS!

Because Auto Retry initialized by automatic there are no current chat, user and request.

So we can not use:

Bot.sendMessage("Hello");  //not works with Auto Retry

Why? Bot do not know chat for sending message! No current chat.

So it is need define chat:

Bot.sendMessage({text: "Hello", chat_id: YOUR_CHAT_ID});

How I can know chat id?

Create simple command (without Aoto Retry): /chat with BJS:

Bot.sendMessage(chat.chatid);

And run it on that chat where you need Auto Retry later. This command return YOUR_CHAT_ID

Fill it in previous command with Auto Retry.

You can use Bot.getProperty and Bot.setProperty. So you can save chat_id in one command and then get it on Auto Retry command

You can not use User.getProperty and User.setProperty.

No user on Auto Retry!

Auto retry works only with . There are now : chat, user, request.

BJS
Variables
message "Hello"
PlayMarketNewsBot