@db_periodic_task(crontab(minute='<STR_LIT>'))<EOL>def clearExpiredTemporaryRegistrations():
from .models import TemporaryRegistration<EOL>if not getConstant('<STR_LIT>'):<EOL><INDENT>return<EOL><DEDENT>if getConstant('<STR_LIT>'):<EOL><INDENT>TemporaryRegistration.objects.filter(expirationDate__lte=timezone.now() - timedelta(minutes=<NUM_LIT:1>)).delete()<EOL>call_command('<STR_LIT>')<EOL><DEDENT>
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.