PortalCMS icon indicating copy to clipboard operation
PortalCMS copied to clipboard

Call Services from scheduled task

Open mtugnoli opened this issue 6 years ago • 2 comments

I need a scheduled action, so I have installed Hangfire on Portal.CMS.Web But I don't know how resolve the service ....

This is my job source :

namespace Portal.CMS.Web.Jobs
{
    public class Job
    {
        public async Task DoWork()
        {
            IMenuService _menuService = DependencyResolver.Current.GetService<IMenuService>();  // ERROR

        }
    }
}

mtugnoli avatar Dec 17 '18 14:12 mtugnoli

Hi mtugnoli, were you able to make any progress with this?

tommcclean avatar Mar 10 '19 11:03 tommcclean

no, I'm working on other topics, how can I solve this problem?

mtugnoli avatar Mar 15 '19 07:03 mtugnoli