是否有一个REST API调用的Azure移动服务的调度运行一次? [英] Is there a REST API call for Azure Mobile Service's Scheduler Run Once?

查看:221
本文介绍了是否有一个REST API调用的Azure移动服务的调度运行一次?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Azure的门户,我可以点击一个Scheduler作业一旦运行按钮来执行它。是通过功能从我的应用程序REST调用可用?的情况是,周期性地工作运行以检查在数据的变化。第一次应用程序启动时,我想,一旦执行该工作不会有等待预定的时间。

Using the Azure portal, I can click the Run Once button on a Scheduler job to execute it. Is that functionality available via a REST call from my app? The scenario is that periodically a job is run to check for changes in data. The first time the app starts up, I would like to execute that job once as not to have to wait for the scheduled time.

什么是揭开序幕预定作业的电话吗?我会重复在这两个调度工作,定制的API code,然后从我的code调用自定义API?

What is the call to kick off a scheduled job? Would I have to duplicate code in both the scheduler job and custom API and then call the custom API from my code?

推荐答案

您可以通过发送 POST 要求 /作业执行调度工作/<&JOBNAME GT;(不需要请求体)。但是,你需要通过你的移动服务的主密钥(在 X-谟主 HTTP标头),所以你只应该做的,从不可见的位置给用户 - 你不想让任何人得到您的主密钥的一抱,因为这将打开你的服务,为所有类型的攻击

You can execute a scheduler job by sending a POST request to /jobs/<jobName> (no request body required). But you need to pass the master key of your mobile service (in the x-zumo-master HTTP header), so you should only do that from a location that is not visible to your users - you don't want anyone getting a hold of your master key, as this would open up your service for all kinds of attacks.

这篇关于是否有一个REST API调用的Azure移动服务的调度运行一次?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆