V175 Scheduler not writing to event log  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

V175 Scheduler not writing to event log

Postby 2can2 » Wed Jul 24, 2019 5:18 pm

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
2can2
Frequent Contributor
Frequent Contributor
 
Posts: 171
Joined: Tue Feb 26, 2008 10:24 am
Topics Solved: 25

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

Postby Mike.Sheen » Thu Jul 25, 2019 12:50 pm

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.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2440
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 755


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron