What you could use is the WebJobs feature. You can find a detailed documentation on how to create such WebJobs at Mircosoft Learn: https://learn.microsoft.com/en-us/azure/app-service/webjobs-create?tabs=linuxcode
But unfortunately is WebJobs only for Window Code GA. For Windows Containers, Linux Code and Linux Containers App Serivce WebJobs are in Preview :) Hope that helps to solve your question.