All articles
Live Trading

Auto-Start Your Bots: How Expiry-Based Scheduling Works

The scheduler starts live bots automatically on chosen days relative to expiry, removing the daily manual start. How DTE slots work, what the scheduler does not do, and how to set it up safely.

Arthalab6 min read
A deployed bot switches itself off after each market close, and the scheduler is how you avoid starting it by hand every morning. You choose which days relative to expiry a strategy should run, and it starts on those days without you.

Why bots switch off at all

Deploying and starting are separate actions, and the off-by-default behaviour is deliberate. A strategy left running unattended across days trades conditions nobody reviewed — a results day, a policy announcement, a gap after a weekend of news.
The alternative fails in a specific way: you forget a bot exists, it keeps trading, and you find out weeks later. An opt-in default makes forgetting harmless.

What the scheduler changes

The scheduler resolves the tension. You still opt in, but you opt in once for a pattern rather than every morning.

Scheduling by days to expiry

Index option behaviour is not uniform across the week. Expiry day is different from the day a new series opens, and strategies are usually built for one part of that cycle.
The scheduler therefore works in DTE slots — days to expiry — rather than weekdays.
SlotMeaning
EXPIRYExpiry day itself
DTE-1One trading day before expiry
DTE-2Two trading days before expiry
DTE-3Three trading days before expiry
DTE-4Four trading days before expiry
DTE-5Five trading days before expiry
Expiry schedules are set by the exchanges and shift around holidays, which is the most common reason a strategy runs on a day its author did not intend.

What the scheduler covers

Covered
Which strategiesLive deployments
Which indicesNIFTY and SENSEX
What it doesStarts the bot on the chosen days
WhenBefore the market opens
Checks appliedThe same ones a manual start applies
That last row matters. A scheduled start is not a shortcut past the usual conditions — a bot that would fail a manual start fails a scheduled one for the same reason.

What it does not do

Being precise here prevents the specific failure of assuming the morning is fully handled.
  • It does not log in to your broker. That is interactive by design on the self-serve brokers and cannot be automated.
  • It does not add margin. A bot that starts without funds still fails when it tries to place an order.
  • It does not fix a stale IP. A whitelist entry that has gone stale still rejects orders.
  • It does not raise your strategy limit. Three running at once remains three, with paper bots counting.
  • It does not stop bots. They switch off after the close as usual.

Setting it up

1

Deploy the strategy live first

The scheduler starts existing deployments; it does not create them.
2

Decide which part of the expiry cycle it is for

Expiry day, the day before, or earlier in the series. These are genuinely different trades.
3

Assign it to those DTE slots

Only the slots the strategy was designed for, not all of them by default.
4

Confirm the strategy's own day restrictions agree

The builder can also restrict which days a strategy runs. Two mechanisms disagreeing is a confusing state.
5

Watch the first scheduled morning

Check it started and check the logs after your entry time. Confirm once rather than assuming forever.

A sensible pattern

A common and workable arrangement: schedule the strategies that run on a fixed cycle, and start anything occasional by hand.
That keeps the scheduler covering the predictable part of your routine while leaving deliberate decisions deliberate. A strategy you only want to run under particular conditions is a poor candidate for automation, because the scheduler cannot evaluate those conditions.

Checking it worked

The failure mode of any automation is silence, so a brief check is worth building in.
  • Count how many bots should be running today, and confirm that number
  • Check the logs after your entry time has passed
  • Confirm an empty log means the condition was not met, not that nothing ran
  • Watch for a scheduled day that was a holiday — the expiry may have shifted
An empty log is the distinguishing signal. A bot that ran and declined to trade leaves a trail of evaluations; one that never started leaves nothing.

Telegram alerts alongside it

Alerts cover the part the scheduler cannot. A morning message goes out when a connected broker's token has expired, and another when bots are deployed but not started.
Together they close most of the gap: the scheduler handles the start, and the alerts tell you about the one thing it cannot handle.

The short version

  • Bots switch off after each close by design, so nothing trades a day you did not intend
  • The scheduler starts live bots on chosen days relative to expiry
  • DTE slots key to the expiry, so holiday shifts do not break the schedule
  • It applies the same checks a manual start applies — it is not a shortcut
  • It does not do your broker login, add margin or fix a stale IP
  • Confirm the first scheduled morning rather than assuming it worked

Frequently asked questions

By design, so that no strategy trades a day you did not intend. The alternative — bots running until stopped — fails by trading on while you have forgotten they exist.

Days to expiry. Scheduling by DTE rather than by weekday means the schedule follows the expiry, so a holiday shift does not cause the strategy to trade the wrong day.

No. The broker login is interactive by design on the self-serve brokers and cannot be automated. The scheduler removes the start step, not the login step.

Live deployments on NIFTY and SENSEX. The scheduler starts existing deployments rather than creating them.

No. The same conditions apply as a manual start. A bot that would fail to start by hand fails on a schedule for the same reason.

The scheduler covers live deployments. Paper bots still count towards the three-strategy limit whether or not they are scheduled.

Count the bots that should be running and check the logs after your entry time. An empty log means nothing ran; a log full of evaluations means it ran and decided not to trade.

Schedule what runs on a fixed cycle. A strategy you only want under particular conditions is a poor candidate, because the scheduler cannot evaluate those conditions.

Start with a free 3-day trial

Build a strategy, backtest it and run it on paper — no broker, no IP and no money needed to try it.

Ask us on Telegram
Auto-Start Your Bots: How Expiry-Based Scheduling Works | Arthalab — Algo Trading India