適用於 Node.js 的 Azure 排程器模組Azure Scheduler modules for Node.js

Azure 排程器會透過 HTTP、HTTPS、儲存體佇列或 Azure 服務匯流排,建立、維護和叫用已排程的工作。Azure Scheduler creates, maintains, and invokes scheduled work via HTTP, HTTPS, a storage queue, or the Azure Service Bus.

深入了解 Azure 排程器Learn more about Azure Scheduler.

管理封裝Management package

透過管理 API,跨各種通訊通道建立、維護及叫用已排程的工作。Create, maintain, and invoke scheduled work across various communication channels with the management API.

安裝 npm 模組Install the npm module

安裝 Azure 排程器 npm 模組Install the Azure Scheduler npm module

npm install azure-arm-scheduler

範例Example

此範例會列出目前的排程器。This examples lists the current schedulers.

const msRestAzure = require('ms-rest-azure')
const SchedulerManagement = require('azure-arm-scheduler')

msRestAzure.interactiveLogin().then(credentials => {
    // Create a scheduler from the login credentials
    let client = new SchedulerManagement(credentials, 'your-subscription-id')
    // Get the full list of current jobs for the subscription
    return client.jobCollections.listBySubscription()
}).then(currentJobs => {
    console.log("Current jobs:")
    console.dir(currentJobs, {depth:null, colors:true})
}).catch(error => {
    console.log("An error occurred:")
    console.dir(error, {depth:null, colors:true})
})

範例Samples

深入探索可在應用程式中使用的 Node.js 程式碼範例Explore more sample Node.js code you can use in your apps.