Is it possible running a Flask custom command as task?

Hi, i need to schedule some maintenance scripts that are already working as flask commands.

I've tried to set the tasks using this sintax:

/home/my_home_folder/.virtualenvs/flask_app_venv/bin/python /home/my_home_folder/.virtualenvs/flask app_venv/bin/flask command-name action-name

If i run this command using a console everything works fine. If I use the same command inside a task I get this error:

Error: No such command 'command-name'.

Could someone help me please?

Make sure you're running the task with the correct working directory: