A newer version of the Ed-Fi ODS / API is now available. See the Ed-Fi Technology Version Index for a link to the latest version.
How To: Clear expired client access tokens with a database job
Currently, the API handles clearing expired client access tokens with a background task that runs on a configurable interval. However, an alternative solution could be to have a database scheduled job running on the server that hosts the Ed-Fi-Admin database.
Implementation Steps
- Disable API background task
- Verify that the database server job agent is enabled and running
- Create scheduled job which consists of:
- Job - to encapsulate all job steps
- Job Step - to execute the command(s)
- Schedule - to schedule when the job and all of its steps will be executed
Disable API background task
"ScheduledJobs": [
{
"Name": "DeleteExpiredTokens",
"IsEnabled": false,
"CronExpression": "0 0/30 * 1/1 * ? *"
}
]
Create Scheduled Job
Modify and execute the SQL Server or PostgreSQL script below in order to create the scheduled job within your database server.
, multiple selections available,