code: def clearExpiredTemporaryRegistrations():
      '''
      Every hour, look for TemporaryRegistrations that have expired and delete them.
      To ensure that there are no issues that arise from slight differences between
      session expiration dates and TemporaryRegistration expiration dates, only
      delete instances that have been expired for one minute.
      '''
      from .models import TemporaryRegistration
  
      if not getConstant('general__enableCronTasks'):
          return
  
      if getConstant('registration__deleteExpiredTemporaryRegistrations'):
          TemporaryRegistration.objects.filter(expirationDate__lte=timezone.now() - timedelta(minutes=1)).delete()
          call_command('clearsessions'f clearExpiredTemporaryRegistrations():
      '''
      Every hour, look for TemporaryRegistrations that have expired and delete them.
      To ensure that there are no issues that arise from slight differences between
      session expiration dates and TemporaryRegistration expiration dates, only
      delete instances that have been expired for one minute.
      '''
      from .models import TemporaryRegistration
  
      if not getConstant('general__enableCronTasks'):
          return
  
      if getConstant('registration__deleteExpiredTemporaryRegistrations'):
          TemporaryRegistration.objects.filter(expirationDate__lte=timezone.now() - timedelta(minutes=1)).delete()
          call_command('clearsessions')
docs: Every hour, look for TemporaryRegistrations that have expired and delete them.
      To ensure that there are no issues that arise from slight differences between
      session expiration dates and TemporaryRegistration expiration dates, only
      delete instances that have been expired for one minute.