Skip to content
Enterprise IT · Boxed product · 2022

Dynamics 365 scheduler: test environments that switch themselves off

For a company that implements Microsoft Dynamics 365 we built a tool that starts and stops cloud environments on each developer’s working hours. The client then sold it as a boxed product.

A table of Dynamics 365 environments with start and stop buttons, weekday and weekend hours and the deployment status
up to 69%fewer billed hours for an environment that runs only on working days, in the client’s calculation
1 clickto pull every environment of an LCS project into the list
Year
2022
Team
Rost Company developers, Ross as the architect
Integrations
Microsoft LCS API, Azure AD

Challenge

Every Dynamics 365 finance and operations project needs several cloud environments: one per developer, a test environment and a build machine. They live in Microsoft Lifecycle Services (LCS), run on Azure and are billed by the hour, so unless someone stops them they keep billing at night and at weekends. LCS lets you stop an environment by hand or set up auto-shutdown, but auto-shutdown needs admin access to Azure and is awkward to change for every developer. On top of that, LCS itself often showed the wrong deployment status of an environment.

What we built

  • A schedule for every environment: start and end times for working days and for weekends, in the time zone of the developer who uses it.
  • Projects with their LCS access: a project keeps its LCS project ID and the Azure AD app that signs in to the LCS API, and one click pulls all of the project’s environments into the list.
  • One table for all environments with start and stop buttons, the project, the developer, the schedule and the deployment status, plus search, filters and sorting.
  • The real deployment status: the tool asks LCS for the actual state of each environment (Deployed, Starting, Stopping, Stopped) and refreshes the whole list on request.
  • A scheduler on the server that sends start and stop commands through the LCS API at the right time and reports every finished command.
  • Licensing for a boxed product: a key sets the number of projects and a trial period, so the client could sell one installation per customer.
  • Installation with one command: Docker Compose with Nginx and a free HTTPS certificate (Certbot), so the tool runs on the customer’s own server.

What a schedule saves

Billed hours of one environment per month

  • Always on: 24 h × 30 days720 h
  • 12 h on 22 working days264 h
  • 10 h on 22 working days220 h

A 10-⁠hour working day cuts the billed hours by about 69%, a 12-⁠hour one by about 63%. The pay-⁠as-⁠you-go price of the machine drops by the same share.

A calculation from the client’s product presentation, not a measurement: 24 × 30 = 720 h, 12 × 22 = 264 h, 10 × 22 = 220 h.

Process

Ross designed the architecture and the integration with the LCS API, and a couple of Rost Company developers built the tool on our own groundwork in TypeScript, Node.js, React and MongoDB. We worked in the client’s Microsoft Teams channel, where the tool also ran as a tab, so developers could start and stop their environments without leaving the chat. The work took from May to July 2022.

Results

  • An environment that runs 10 hours on 22 working days is billed for 220 hours a month instead of 720, about 69% less.
  • Developers manage every environment of every project on one page, without Azure admin rights and without touching Azure settings.
  • The client sold the tool as a boxed product with licence keys and a trial period.

Screens

Let’s talk

Planning something similar?

Describe your project in the form below, and we’ll reply in writing with how we would approach it. Or book a 30-⁠minute call with our founder about scope, timeline and the team we’d put on it.

Wrocław, Poland · Central European Time

Prefer to write? Describe the task in two or three lines and we’ll reply by email.

    We use your details only to reply. Privacy

    Thank you! Your message is with us, and we’ll reply by email.

    Test mode: the form works, but this preview sends nothing.

    Book a 30-⁠min call