TaskInfoProvider.GetTaskInfo always return null

Mani SJ asked on June 21, 2021 09:21

I got below from api example

TaskInfo runTask = TaskInfoProvider.GetTaskInfo("myTaskName", SiteContext.CurrentSiteID);

I checked myTaskName in CMS_ScheduledTask table and SiteContext.CurrentSiteID in CMS_Site. Both are correct. I am trying to run a schedule task based on button click.

Correct Answer

Mani SJ answered on June 22, 2021 07:42

The name way not works. You can get the Id of the task by name and then use the taskID to get taskinfo.

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.