32 lines
840 B
C#
32 lines
840 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.SharePoint;
|
|
using Taloyhtio.CustomAlertHandler.CodeFiles;
|
|
using Taloyhtio.CustomAlertHandler.CodeFiles.ChangeAlertTemplates;
|
|
|
|
namespace ConsoleJobRunner
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
if (args.Length != 1)
|
|
{
|
|
Console.WriteLine("Usage: exe {web_app_url}");
|
|
return;
|
|
}
|
|
|
|
using (var site = new SPSite(args[0]))
|
|
{
|
|
var webApp = site.WebApplication;
|
|
var connStr = AlertTemplateConfigurator.GetFBAConnectionString(webApp);
|
|
var engine = new JobEngine(connStr, webApp);
|
|
engine.Run();
|
|
}
|
|
}
|
|
}
|
|
}
|