Skip to content
Unverified accounts cleanup

Unverified accounts cleanup

Deletes sign-up accounts that never confirmed their email address.

How it works

When someone signs up, an account is created in an “unverified” state and a verification email is sent. The verification link expires after 24 hours. This job removes accounts whose verification window has lapsed so that the same email can be re-used for a fresh sign-up.

  1. Finds accounts — unverified accounts older than the grace period
  2. Deletes — each of these accounts is deleted, together with its pending verification

The cleanup covers all of mTime, not one workspace. It only runs in the system workspace; in every other workspace it is skipped, and it can only be triggered manually from the system workspace.

When it runs

The job runs automatically and only triggers when there is at least one account to delete.

Parameters

ParameterDefaultDescription
Grace Period (hours)24Hours after account creation before an unverified account becomes eligible for deletion. Values below 24 are raised to 24 to protect accounts whose verification link is still valid
Dry RunfalseWhen turned on, report what would be deleted without deleting anything

Job results

MetricDescription
candidatesNumber of unverified accounts past the grace period
deletedNumber of accounts actually deleted (0 in dry run)
grace_period_hoursThe grace period actually used (at least 24)
dry_runWhether this was a dry run

A run with no candidates returns skipped: true, reason: "no candidates".

Troubleshooting

IssueSolution
Account not deletedConfirm the grace period has passed. A grace period shorter than 24 hours is never used
Email still rejected for sign-up after cleanupRun a dry run to confirm which accounts would be deleted, then a real run. Verify no other workspace still has a user referencing that account