Scraper not saving to database as scheduled task

Problem is that my scraper is not saving the output to Mysql database. It works in Bash console but not as scheduled task. I don't know where to look for errors/ logs for the scheduled tasks. The configuration is a Django website and BaseCommand, see below, please help:

scrape XXX
class Command(BaseCommand):
    help = "collect jobs"

    # define logic of command
    def handle(self, *args, **options):
        # set url
        url = 'XXX'

     "titel": titel,
     "locatie": locatie

For the logs -- go to the Tasks page and look at the Actions column in the tasks table, first button should open the log for the task on a given row.