Scheduled Tasks not running when installed on Azure Web App

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 years ago
Hello,

I'm running 4.20 on an Azure Web App service.  It appears none of the Scheduled Tasks are running.  My main concern is to have Send emails to run according to the schedule tasks.  For the sake of testing, the only Task that is enabled is the Send emails task; all other tasks are disabled.  In Azure, there's a special feature that you can enable to keep the site alive.  I can confirm that my site does not fall asleep.

I already confirmed my Store URL is correct in Admin/Configuration/Stores.

I can confirm that the scheduled tasks run fine on an on-premise IIS server.

Is there anything special I need to do in my Azure environment to get the Schedule Tasks to work.

Best regards!
4 years ago
Have you checked the system > log for any errors?

Maybe this will help
https://www.nopcommerce.com/boards/t/50596/nop-4-scheduletasks-not-running-automatically.aspx?p=2
4 years ago
I checked System > Logs but there are no records that the task even ran.  I also checked the IIS logs.  Nothing was logged to indicate the task ran.

I also followed the link in your response.  I did all of that - which is how I got my on-prem box to work.  It's only Azure that I'm struggling with.
4 years ago
I found out why this wasn't working.

In Azure, I set up a firewall rule to grant access only my organization's PAT address.  This made it impossible for the scheduled task to run against the URL specified in our Store configuration.  Once I added the Azure ip address, the scheduled tasks started running.

I set up this firewall rule because our site doesn't officially launch until next month.  This was my way of hiding it from the public, but in doing so, it hid the site from the scheduled task as well.
4 years ago
Does anyone know the IP address that [email protected] uses?

I'm using the web.config in our 4.20 test site to restrict IP addresses:
       <security>
    <ipSecurity allowUnlisted="false">
                        <add ipAddress="xxx.xxx.xxx.xxx" allowed="true" />
                        <add ipAddress="yyy.yyy.yyy.yyy" allowed="true" />
    </ipSecurity>
  </security>

This works fine except that it stops scheduled tasks from running.  I've included 127.0.0.1 and also the ip address of our Azure app service that hosts the site but no joy.
3 years ago
Mike,

Can you share what you did in Azure ? I have the same problem.

Regards,

Victor A. Mendivil
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.