我刚刚将quartz.net dll添加到我的bin中并启动了我的示例.如何根据时间使用quartz.net调用C#方法?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Quartz;
using System.IO;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if(SendMail())
Response.write("Mail Sent Successfully");
}
public bool SendMail()
{
try
{
MailMessage mail = new MailMessage();
mail.To = "test@test.com";
mail.From = "sample@sample.com";
mail.Subject = "Hai Test Web Mail";
mail.BodyFormat = MailFormat.Html;
mail.Body = "Hai Test Web Service";
SmtpMail.SmtpServer = "smtp.gmail.com";
mail.Fields.Clear();
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "redwolf@gmail.com");
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "************");
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", …Run Code Online (Sandbox Code Playgroud) 我有一个简单的问题要问..有没有人知道如何在ASP.NET MVC 4中创建重复的调度程序.我正在尝试构建的是一个灌溉系统,我可以设置我的系统的星期几和时间每周激活.因此,用户将选择星期几以及系统应运行的时间和持续时间.如何保持一个运行时钟触发系统打开?我应该使用下拉列表来查找我的属性吗?虽然它会很好,但我并没有要求你为我编写一个完整的应用程序..正确方向的一个简单点将有很大帮助..通过网络搜索答案的问题是我真的不知道要搜索什么.
先感谢您..