Run scheduled tasks in a Python API to achieve a cron job like functionality without obstruction the API flow