i created a management directory in my project root directory and inside it i created a command directory to place the file run_daily_task.py inside it and make it run daily
how ever when i try to run it by typing (python manage.py run_daily_task) in the terminal it gives me the error: Unknown command: ‘run_daily_task’
Type ‘manage.py help’ for usage.
this is what run_daily_task looks like:
from django.core.management.base import BaseCommand
from Hiral.my_daily_task import my_daily_task
class Command(BaseCommand):
help = 'Runs my daily task'
def handle(self, *args, **options):
my_daily_task() ```