How to build scheduled Workflows

This post details the "Why?" and "How?" of Temporal's new Scheduler feature, which replaces a previous simple schedule feature with improved capabilities like stopping/pausing schedules independently of workflows, updating configurations, supporting overlapping runs, and providing better visibility. The decision was made to build the Scheduler as a Workflow directly within the Temporal Server for code reuse and flexibility. Key engineering challenges addressed include running scheduler Workflows in user Namespaces while using system Namespace task queues, requiring additional SDK workers per Namespace. To "hide" these internal Workflows from user queries, a search attribute was introduced to create "Namespace divisions." Interaction with the scheduler uses gRPC APIs, with signals for state changes and a novel approach involving frontend service checks and signals to accurately describe running Workflows due to the lack of direct child workflow completion notifications.