Page 1 of 1

V175 Scheduler not writing to event log

PostPosted: Wed Jul 24, 2019 5:18 pm
by 2can2
Hi, I have the following code in a V175 plugin and the scheduler is running and starts the plugin to process SO's but it does not write 'Started' to the event log? What am I doing wrong?

Public Sub Execute(ByVal Plugin As JiwaApplication.Plugin.Plugin, ByVal Schedule As JiwaApplication.Schedule.Schedule) Implements JiwaApplication.IJiwaScheduledExecutionPlugin.Execute

JiwaApplication.Manager.Instance.LogEvent("2CAN.ONA.SalesOrderAutomation started", 2, 0, 0)
Try
SalesOrder_AutoPost()
Catch ex As Exception
JiwaApplication.Manager.Instance.LogEvent(ex.ToString, 2, 0, 0)
End Try

Re: V175 Scheduler not writing to event log  Topic is solved

PostPosted: Thu Jul 25, 2019 12:50 pm
by Mike.Sheen
The Execute method which you've got your logging in is only invoked as per any enabled schedules attached to the plugin.

If you put your log entry writing inside the OnServiceStart method, then you should see it appear in the event log - I'd do that as a troubleshooting exercise even if you don't permanently want it there - just to make sure your log writing is working.

Then, make sure the schedule(s) you have against the plugin are enabled and the schedule is configured to run as you expect - if they are then any logging you have put in the Execute method should work.

Also double-check the JiwaPluginSchedulerService.exe.config configuration file to make sure you are connecting to the right database - this is a common mistake easy to make.