-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I have
- Django 5.2
- Django-q2 1.7.6
- Python 3.13
I did the basic setup as instructed in the documentation and nothing happens. What I did:
- I created new app
schedulerwithpython manage.py startapp scheduler - I registered the app in
INSTALLED_APPS - I created
tasks.pyfile where I placed following code:
from django_q.models import Schedule
from django_q_registry import register_task
print("register?")
@register_task(
name="Send hello world",
schedule_type=Schedule.CRON,
# https://crontab.guru/#*/5_*_*_*_*
cron="*/5 * * * *",
)
def test_hello_world():
return "HELLO WORLD!"I can see from runserver logs that print command so the code from tasks.py is loaded but nothing happens. I presume that this should create new Schedule object but there's nothing when I checked from admin panel. Really mysterious as running this code is not even giving me any errors or anything.
Also tested with registry.register, same thing, nothing happens.
EDIT: I can even write it like this and still no errors
from django_q_registry import register_task
@register_task()
def test_hello_world():
return "HELLO WORLD!"Metadata
Metadata
Assignees
Labels
No labels