我是否可以在指定时间每天运行Web服务 [英] Is it possible for me to run a web service daily at a specified time

查看:55
本文介绍了我是否可以在指定时间每天运行Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

HI Guys



我想知道是否可以创建一个每天在特定时间运行的网络服务?



我尝试了什么:



我知道如何创建一个在预定时间运行的Windows服务想知道是否可以使用Web服务

HI Guys

I would like to know is it possible to create a webservice that runs at a specific time daily?

What I have tried:

I know how to create a windows service that runs on a scheduled time just would like to know if it is possible with a web service

推荐答案

Web服务不会自行处理任何内容。它仅在收到请求时处理。如果要将计划的请求发布到Web服务,可以使用Windows服务或计划任务。
Web service does not process anything on it's own. It only processes when request is received. If you want to post scheduled requests to web service, you can make use of a windows service or a scheduled task.


如果您知道如何编写计划服务,那么请编写一个调用您的计划服务webservice方法在所需的时间。根据你的要求做不同的方法



如何:使用WebRequest类发送数据 [ ^ ]



WebClient类(System.Net) [ ^ ]
If you know how to write a scheduling service then write one that calls your webservice method at the desired time. Different ways to do this depending what you're after

How to: Send Data Using the WebRequest Class[^]

WebClient Class (System.Net)[^]


这篇关于我是否可以在指定时间每天运行Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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