def do_custom():
    """This task runs once a day and when is_foo returns True
    This task runs on separate thread"""
    ...
This task runs once a day and when is_foo returns True
This task runs on separate thread
docs/code/demos/advanced.py