2024-03-29 13:11:34 发布
网友
根据https://developers.google.com/appengine/docs/python/config/cron,作业在指定的url上调用get。有没有办法将作业配置为调用post?在
如果您担心访问此URL,则可以限制它:
You can prevent users from accessing URLs used by scheduled tasks by restricting access to administrator accounts. Scheduled tasks can access admin-only URLs. You can restrict a URL by adding login: admin to the handler configuration in app.yaml.from Securing URLs for cron
You can prevent users from accessing URLs used by scheduled tasks by restricting access to administrator accounts. Scheduled tasks can access admin-only URLs. You can restrict a URL by adding login: admin to the handler configuration in app.yaml.
from Securing URLs for cron
使用cron作业来命中特定的url。从GET到url,运行一个脚本,然后通过任务队列将POST发送到另一个url:
GET
POST
try: taskqueue.Task( url="/some_url/", name=task_name, method="POST", params={ "post_param_1": post_param_1, "post_param_2": post_param_2, "post_param_3": post_param_3, etc } ).add(queue_name="my-queue") except: pass #throws TombstonedTaskError if tombstoned name used.
如果您担心访问此URL,则可以限制它:
使用cron作业来命中特定的url。从
GET
到url,运行一个脚本,然后通过任务队列将POST
发送到另一个url:相关问题 更多 >
编程相关推荐