It is a good option to run complex programs in scheduling (web job) or better the classic VM?
Yes, It is a good option to use Paas - Platform as a Service - to run complex programs. Especially if there is no need for micro-configurations in the infrastructure.
I would recommend only using VM if there is a real need to perform some configuration on the hosting server where a hosting platform does not allow you.
I always think about segregating responsibilities when asked about using a platform, or setting up a VM. It is not the responsibility of the developer to maintain the environment in which the application will be hosted. It is only responsible for the application itself. Therefore, we leave this responsibility to Azure, only provide the service and the service, which is where there will be value in your solution.
Using Azure Scheduler it’s not possible, for him alone manage jobs like HTTP.
To do what you need, the ideal is to use Azure Funções. With it you don’t even need to compile a program - it can also, no problem - you just hosts the code snippet that needs to run - be it C#, F#, Node.js, Python, PHP, batch, bash or any executable.
It allows you to configure it oriented to a Timetrigger, so it will be executed peridicamente, according to what you define. See here this example of how to create event processing in Azure.
See here how create your first Azure function.
UPDATE
You can limit resource consumption by using a Service plan, or pay only for what your script will consume - color or memory limitation idependente - using a Dynamic Service Plan.
See here how to scale your Azure Function consumption plan.
and can I tell how much resource I want to use? because imagining that this hj script consumes multiple colors and a lot of ram memory of the Vms
– Dorathoto