Unable to trigger a job in telligent

Former Member
Former Member

Hi Team,

I unable to trigger job from below code and I got the below exception. My job server is running fine.

I referred this link ,community.telligent.com/.../jobs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Telligent.Evolution.Extensibility.Api.Version1;
using Telligent.Evolution.Extensibility.Jobs.Version1;

namespace Telligent.Test.Widget.Extension.Plugin
{
    public class TestJobTemplate : IEvolutionJob, IRecurringEvolutionJobPlugin
    {
        public JobSchedule DefaultSchedule
        {
            get { return JobSchedule.EveryMinutes(1); }
        }

        public Guid JobTypeId
        {
            get { return new Guid("A5F40BA8-7D11-4429-AFE9-8238CE450B73"); }
        }

        public JobContext SupportedContext
        {
            get { return JobContext.Service; }
        }

        public void Execute(JobData jobData)
        {
            var eventLog = Telligent.Common.Services.Get<IEventLog>();

            eventLog.Write(
                "SampleRecurringJob has successfully run",
                new EventLogEntryWriteOptions
                {
                    Category = "Jobs",
                    EventType = "Information"
                });
        }

        public string Description
        {
            get { return "This is a sample recurring job to demonstratoe how the IRecurringEvolutionJobPlugin works"; }
        }

        public void Initialize()
        {
        }

        public string Name
        {
            get { return "Sample Recurring Job"; }
        }
    }
}

Kindly help me resolve this issue, thanks!

Regards,

Kiran Ch.



link upldates
[edited by: kiran at 10:23 AM (GMT 0) on Wed, Aug 18 2021]
Parents Reply
  • Former Member
    0 Former Member in reply to Former Member

    Can you share your job server logs and diagnostics export (at Administration > About > Download Diagnostics)? The name being in the job server log with a message like "STARTED <xyz job>" would indicate the job is in fact running.

    Your job server connectionstrings file is configured to point to the same database and filestore location as the web server?

    Are you able to debug your plugin and see if the Execute method is being hit? You'd need to attach to the job server process to debug.

Children