tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Agentic AI > MCP Protocol > MCP Server with Cloud Scheduler

MCP Server with Cloud Scheduler

Author: Venkata Sudhakar

Cloud Scheduler is a fully managed cron job service that runs on a configurable schedule and triggers HTTP, Pub/Sub, or App Engine targets. Exposing Cloud Scheduler through an MCP server gives AI agents the ability to manage scheduled jobs dynamically - creating new schedules, pausing existing ones, and triggering immediate runs on demand.

ShopMax India uses Cloud Scheduler for daily report generation, weekly supplier sync, and hourly price feed updates. The MCP server below lets the operations agent list active jobs, create new schedules, and force-run a job immediately when the business requires an off-cycle execution.

The below example shows an MCP server that manages Cloud Scheduler jobs as MCP tools, enabling agents to control scheduled operations programmatically.


It gives the following output,

# Agent query: "List all scheduled jobs"
Tool: list_jobs({})

[{"name": "daily-sales-report", "schedule": "0 6 * * *", "state": "ENABLED"},
 {"name": "hourly-price-feed", "schedule": "0 * * * *", "state": "ENABLED"},
 {"name": "weekly-supplier-sync", "schedule": "0 2 * * 1", "state": "ENABLED"}]

# Agent query: "Create a new job to run stock audit every night at 11 PM"
Tool: create_job({name: "nightly-stock-audit", schedule: "0 23 * * *",
                  url: "https://ops.shopmax.in/audit/stock"})

Job created: nightly-stock-audit

# Agent query: "Run the daily-sales-report job right now"
Tool: run_job_now({job_name: "daily-sales-report"})

Job triggered successfully

Set Cloud Scheduler jobs to use OIDC tokens when targeting Cloud Run or internal services so only authenticated callers can invoke the endpoints. Use the Asia/Kolkata timezone for ShopMax jobs to ensure schedules align with Indian business hours. Avoid creating jobs with sub-minute intervals as Cloud Scheduler has a one-minute minimum frequency; use Cloud Tasks or Pub/Sub for higher-frequency work.


 
  


  
bl  br