Search code examples
azurevisual-studio-2015azure-webjobswebjob

How to get the latest "Add Azure Webjob Dialog" in Visual Studio 2015?


I have Visual Studio 2015 version 14.0.25431.01 Update 3, I am seeing a strange behavior while adding a New Azure Web Project to existing Web Application

Add Webjob

I Expect to SEE

Add Webjob

But i see

Add Webjob

- Why am i seeing a old azure dialog, do i need to update any component ?


Solution

  • As far as I know, the newest VS(include VS2017) have removed the schedule window in the dialog and you will find you couldn't create schedule webjobs in the new azure portal.

    There are two new ways to run a schedule webjobs now. Notice: These two ways need web app always on.

    One way you could add CRON expression in settings.job file in the root path of your webjobs project.

    More details, you could refer to below article: Create a scheduled WebJob using a CRON expression

    Another way you could use webjobs SDK extensions' timertrigger. Here is a example:

    // Runs once every 5 minutes
    public static void CronJob([TimerTrigger("0 */5 * * * *")] TimerInfo timer)
    {
        Console.WriteLine("Cron job fired!");
    }