old_contents: import django
  django.setup()
  
  from django.core.management import call_command
  from apscheduler.schedulers.blocking import BlockingScheduler
  
  sched = BlockingScheduler()
  
  @sched.scheduled_job('interval', minutes=3)
  def timed_job():
      print('This job is run every three minutes.')
      call_command("check")
  
  sched.start()
  
new_contents: from apscheduler.schedulers.blocking import BlockingScheduler
  
  sched = BlockingScheduler()
  
  @sched.scheduled_job('interval', minutes=3)
  def timed_job():
      print('This job is run every three minutes.')
      import os
      os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")
      import django
      django.setup()
      from django.core.management import call_command
      call_command("check")
  
  sched.start()
  
subject: Move clock imports