如何在预定的时间自动运行Web服务 [英] How to run web service automatically at scheduled timings

查看:64
本文介绍了如何在预定的时间自动运行Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



在我的asp.net网络应用程序中,我每天都会手动向我网站上的注册用户发送一条短信,



现在我想修复一些时间,在预定的时间,Web服务应自动运行并向用户发送短信。



请帮助我。





问候

Nagaraj.J

Hello,

In my asp.net web application am sending daily one SMS to registered users in my site manually,

Now i want to fix some timing and at that scheduled timings web services should run automatically and send SMS to users.

Please help me.


Regards
Nagaraj.J

推荐答案

Web服务/应用程序在请求 - 响应模型上工作。因此,您无法激活Web服务本身以在特定时间唤醒并发送短信。



我建议建立一个客户端应用程序来调用Web服务具体时间。



您可以通过多种方式实现,但最简单的方法是编写控制台应用程序(甚至是PowerShell脚本)来调用Web服务并使用Windows Scheduler配置在特定时间运行。



有链接可以进一步解释:



http://msdn.microsoft.com/en-us/magazine/cc163821.aspx [ ^ ]



计划任务Web服务 [ ^ ]
Web Services/Applications work on Request-Response model. So, you can not activate a web service itself to wake up and send SMS at certain time.

I would suggest to build a client application to call web service at a specific time.

You can do it in several ways but simplest would be write a console App (or even a PowerShell Script) to call web service and use Windows Scheduler to configure running at specific time.

There link can explain further:

http://msdn.microsoft.com/en-us/magazine/cc163821.aspx[^]

Scheduled Tasks Web Service[^]


这篇关于如何在预定的时间自动运行Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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