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

    Based on the log file, the job is definitely executing. Are you sure you have the most recent version of the plugin compiled and added to your Web/bin folder?

    In order to debug, you'll also need to include the associated .pdb file in this folder as well. Then, from Visual Studio you can select Debug > Attach to process and look for the job service process (Telligent.Jobs.Server or similar). Then the breakpoint in your code should be hit when the job server executes your job.

Children