Forums

Understanding Always On Task

Hey fellow forum members,

I'm currently working on a project that involves using Always On Task and schedulers, but I'm facing a bit of a challenge that I need some help with. I'll explain my situation and what I'm trying to achieve, and I'd really appreciate any insights or suggestions you might have.

Project Overview: I have a Python application running with Always On Task to keep it active 24/7. The application utilizes schedulers to manage jobs, and I've set up a MySQL database to store these scheduler jobs.

The Challenge: The issue I'm encountering is that when I manually restart the task(on local machine, or even on the website if i start it from batch console) it works fine when I restart the task manually. I call this function within if name == 'main': However, when the task is restarted by Always On Task, the function fails to work properly.

Can someone explain how the task runs the code after restart?

What do you mean by "fails to work properly"?