#One.Cron Windows service
Windows service which can load any assembly and periodically call a method in that assembly.
-
Create directory "c:\Program files\One.Cron.4"
-
Copy contents of zip file into directory created above.
-
Launch command prompt.
-
cd into directory created above.
-
Run "c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe One.Cron.4.exe"
-
Make sure that the installation was successful. Check that the following message is output in command prompt: The Install phase completed successfully, and the Commit phase is beginning.
-
Create a new database and a new user of the database.
-
In the new database run the following script to create the table "cron_jobs":
/****** Object: Table dbo.cron_jobs Script Date: 01/22/2013 13:49:07 /
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE dbo.cron_jobs(
id int IDENTITY(1,1) NOT NULL,
admin_email_list varchar(1000) NOT NULL,
crontab_entry varchar(255) NOT NULL,
last_finished datetime NULL,
fully_qualified_class_name varchar(255) NOT NULL,
last_error_message varchar(1000) NULL,
last_error_date datetime NULL,
CONSTRAINT PK_cron_jobs PRIMARY KEY CLUSTERED
(
id ASC
)WITH (PADINDEX = OFF, STATISTICSNORECOMPUTE = OFF, IGNOREDUPKEY = OFF, ALLOWROWLOCKS = ON, ALLOWPAGELOCKS = ON) ON PRIMARY
) ON PRIMARY
GO
SET ANSI_PADDING OFF
GO- In file One.Cron.4.exe.config modify connection string "cron" so that it can access the database created above.
- In file One.Cron.4.exe.config modify
- In Microsoft Management Console for services start One.Cron.4 service.
- Check in log file configured in point 10 whether the service started ok.
- Stop the service.
- Copy all dll files from the existing one.net bin folder into the One.Cron.4 directory created above.
- In the above created database table insert row with following values:
adminemaillist = your email
crontab_entry = * * * * *
last_finished = leave empty (NULL)
fullyqualifiedclass_name = One.Net.BLL.Publisher
- In One.Cron.4.exe.config modify the connection string "MsSqlConnectionString" so that it matches the One.NET preview connection string (in web.config)
- Start service.
- Check in log file configured in point 10 whether the service started ok.