Cron & Scheduled Tasks
Configure external HTTP requests using the URLs shown under Competitions → Settings → Tools. Use the copied URLs from your own store so the correct hostname, installation path, and token are included.
| Task | Schedule | Query parameter |
|---|---|---|
| Closing | Every minute | competitions-cron=check |
| Automatic relisting | Every hour | competitions-cron=relist |
Authentication
Section titled “Authentication”Set a secret token in Tools. Tokens must contain 32 to 128 letters, numbers, hyphens, or underscores. When a token is set, requests without the correct token are rejected.
Illustrative URLs:
https://example.com/?competitions-cron=check&competitions-cron-key=YOUR_TOKENhttps://example.com/?competitions-cron=relist&competitions-cron-key=YOUR_TOKENReplace the placeholder with the configured token. Keep real tokens out of public documentation, screenshots, and support attachments. Update both scheduled requests after changing the token.
Check task status
Section titled “Check task status”Open Competitions → Settings → Tools → External Cron Status. Each task shows its last start and last successful completion in the store timezone. Refresh the page to update the display.
| Status | What to check |
|---|---|
| Never run | No external run has been recorded since status tracking became available. Check the scheduled URL |
| No successful completion yet | A request started but has not recorded a successful finish |
| OK | A successful completion is recent |
| Late | Closing has no successful completion in the last 5 minutes, or relisting in the last 2 hours. Check the scheduler |
| Error | The task recorded an error. Check server logs and retry |
| Currently running | A recent request is still marked as running. The last successful completion is shown separately |
This panel records requests that reach the plugin. It cannot inspect your hosting scheduler settings. After setup, confirm that a test competition closes and records its result.
Response behavior
Section titled “Response behavior”| HTTP status | Meaning |
|---|---|
| 200 | Request completed; the response body can be empty |
| 400 | Unknown task |
| 403 | Invalid token |
| 409 | Another competition cron operation holds the database lock |
The closing handler runs repeated checks during a request and can take roughly forty seconds or more. Configure the scheduler timeout accordingly. The database lock serializes closing and relisting, so review occasional overlaps before treating a 409 as a persistent failure.
Exclude these requests from page caching and confirm they reach WordPress. A browser countdown or a dismissed administration notice does not prove that scheduled processing is working. Verify a scheduled competition’s saved status and result after its end time.
