什么是 Azure 计划程序?What is Azure Scheduler?

Important

Azure 逻辑应用将替换即将停用的 Azure 计划程序。Azure Logic Apps is replacing Azure Scheduler, which is being retired. 若要安排作业,请改为试用 Azure 逻辑应用To schedule jobs, try Azure Logic Apps instead.

Azure 计划程序通过以声明性的方式描述操作,帮助创建在云中运行的作业Azure Scheduler helps you create jobs that run in the cloud by declaratively describing actions. 该服务随后自动安排并运行这些操作。The service then automatically schedules and runs those actions. 例如,可以在 Azure 内部和外部调用服务(如调用 HTTP 或 HTTPS 终结点),还可以将消息发布到 Azure 存储队列和 Azure 服务总线队列或主题。For example, you can call services inside and outside Azure, such as calling HTTP or HTTPS endpoints, and also post messages to Azure Storage queues and Azure Service Bus queues or topics. 可以立即或稍后运行作业。You can run jobs immediately or at a later time. 计划程序轻松支持复杂计划和高级重复周期Scheduler easily supports complex schedules and advanced recurrence. 计划程序指定何时运行作业、保留可以查看的作业结果历史记录,然后以可预测且可靠的方式安排工作负载运行。Scheduler specifies when to run jobs, keeps a history of job results that you can review, and then predictably and reliably schedules workloads to run.

虽然可以使用计划程序来创建、维护和运行安排的工作负载,但计划程序不会托管工作负载或运行代码。Although you can use Scheduler to create, maintain, and run scheduled workloads, Scheduler doesn't host the workloads or run code. 该服务仅调用在其他位置托管的服务或代码,例如,在 Azure 中或本地托管,或与其他提供程序一起托管。The service only invokes the services or code hosted elsewhere, for example, in Azure, on-premises, or with another provider. 计划程序可以通过 HTTP、HTTPS、存储队列、服务总线队列或服务总线主题进行调用。Scheduler can invoke through HTTP, HTTPS, a Storage queue, a Service Bus queue, or a Service Bus topic. 若要创建、管理和安排作业,可以使用 Azure 门户、代码、计划程序 REST APIAzure 计划程序 PowerShell cmdlet 参考To create, manage, and schedule jobs, you can use the Azure portal, code, Scheduler REST API, or Azure Scheduler PowerShell cmdlets reference. 例如,可以使用脚本以及在 Azure 门户中以编程方式创建、查看、更新、管理或删除作业和作业集合For example, you can programmatically create, view, update, manage, or delete jobs and job collections by using scripts and in the Azure portal.

其他 Azure 计划功能也在后台使用计划程序,例如,Azure WebJobs,这是 Azure 应用服务中的一个 Web 应用功能。Other Azure scheduling capabilities also use Scheduler in the background, for example, Azure WebJobs, which is a Web Apps feature in Azure App Service. 可以使用计划程序 REST API 管理这些操作的通信。You can manage communication for these actions by using the Scheduler REST API. 帮助管理这些操作的通信。helps manage the communication for these actions.

计划程序可在以下方案中提供帮助:Here are some scenarios where Scheduler can help you:

  • 运行重复执行的应用操作:例如,定期将数据从 Twitter 收集到源中。Run recurring app actions: For example, periodically collect data from Twitter into a feed.

  • 执行日常维护:例如每天删改日志、执行备份和其他维护任务。Perform daily maintenance: Such as pruning logs daily, performing backups, and other maintenance tasks.

    例如,作为管理员,你可能需要在接下来九个月的每天凌晨 1 点备份数据库。For example, as an administrator, you might want to back up your database at 1:00 AM every day for the next nine months.

后续步骤Next steps