Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Oumarou Dicko 5 posts 85 karma points
    May 28, 2019 @ 17:06
    Oumarou Dicko
    0

    Unrecognized element 'scheduledTasks'

    Hi Everyone.

    I am trying to add a scheduled task into my umbraco website. I have added this section in the file umbracoSettings.config:

    <scheduledTasks>
         <task log="true" alias="test60" interval="60" url="http://localhost:52732/umbraco/api/jobvacancies/sync" />
    </scheduledTasks>
    

    But it is throwing the following exception:

    Umbraco.Core.Exceptions.BootFailedException: Boot failed. ---> System.Configuration.ConfigurationErrorsException: Unrecognized element 'scheduledTasks'. (C:\\Source\\Repos\\giro-website\\src\\Giro.Website\\config\\umbracoSettings.config line 61)\r\n   at System.Configuration.BaseConfigurationRecord.EvaluateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult)\r\n   at System.Configuration.BaseConfigurationRecord.Evaluate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject)
    

    I am not sure if this settings has been moved with the version 8 of umbraco.

    Thanks

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Jun 03, 2019 @ 14:29
    Sebastiaan Janssen
    0

    Scheduled tasks are no longer supported in v8.

    We would encourage you to looking into leveraging something like Hangfire instead: https://cultiv.nl/blog/using-hangfire-for-scheduled-tasks-in-umbraco/

  • Rutger Buijzen 3 posts 101 karma points c-trib
    Sep 10, 2019 @ 12:33
    Rutger Buijzen
    100

    Hi @sebastiaan,

    Just to be sure, your answer seems to conflict with:

    https://our.umbraco.com/documentation/Reference/Scheduling/

    Could it be that this BackgroundTaskRunner documentation has been added later?

    tx

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Sep 11, 2019 @ 07:41
    Sebastiaan Janssen
    1

    No conflict, this has nothing to do with the old scheduledTasks config.

    It's the built-in Umbraco way (indeed the docs were added later).

    Hangfire is a good alternative with a built-in interface to monitor scheduled tasks.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies