title: Django Background Tasks Without command
body: <p>I am new to Django and the django-background-tasks package.</p>
  <p>I am facing an issue that I couldn't do/start background task unless I forcefully run the command process_tasks , that is python manage.py process_tasks. I want to do/start background task without run the process_tasks command.</p>
  <p>i am creating rest api .So i want to run the background task automatically, with out writing the command.
  how it is possible. ?
  i found a code. thats is shown in below.. But i didt get in which file i put the code.</p>
  <pre><code>from django.core.management import call_command
  
  call_command('process_tasks')
  </code></pre>
  <p>this is my task.py</p>
  <pre><code>@background(schedule=60)
  def rfid_sync(empid):
      try:
          print(&quot;Process start&quot;)
          emp = Employee.objects.get(EmployeeId=1)
          div = Device.objects.get(DeviceId=1)
          sync = Synchronization(
              Employee=emp,
              Device=div,
              SyncType=1
          )
          sync.save()
      except Exception as ex:
          logging.getLogger(&quot;error_logger&quot;).exception(repr(ex))
  </code></pre>
  <p>i am calling the task from my views.py</p>
  <pre><code>def proces_add(request):
     emp=Employee.objects.get(EmployeeId=request.data.get(&quot;Emp&quot;))
     rfid_sync(emp.EmployeeId)
  </code></pre>