Skip to content
Discussion options

You must be logged in to vote

A few days later, and I'm basically able to answer my own questions. 🤣
So in case anyone else stumbles upon this thread, here what I found out:

  1. I couldn't find an official way to determine on how the script was run. However I noticed that when creating an event rule, you can pass additional data via the action_data field. So when entering something like
    {"run_by": "event_rule"}
    the script can check for this variable.
    With the REST-API it's also possible to add additional fields, so we can check this as well. (Though running the script from CLI with ./manage.py runscript will remove any unknown variable!) The thing is: When scheduling the task to repeat regularly via REST-API, the tasks w…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mrmrcoleman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant