Hire for Craft CMS

Console commands

php craft hire/jobs/expire --dry-run          # close jobs past their closing date
php craft hire/jobs/recount                   # rebuild the application counters
php craft hire/applications/export --file=out.csv --job-id=12
php craft hire/applications/prune --days=365 --dry-run
php craft hire/applications/resend 412        # after the SMTP credentials were wrong

hire/jobs/expire

Closes every job past its closing date. Craft's garbage collection already does this while Close jobs when their closing date passes is on; the command is for running it on your own schedule, and --dry-run lists exactly which adverts are stale without changing anything.

hire/jobs/recount

Rebuilds each job's application count from the applications themselves. The count is stored on the job so the jobs index doesn't need a query per row; this is the repair for when it drifts — applications deleted straight out of the database, or a backup restored mid-write.

hire/applications/export

Streams a CSV — UTF-8 with a BOM, formula injection defused.

Option
--fileWhere to write it. Omit for standard output
--job-idOnly this job's applications
--include-archivedInclude archived applications

hire/applications/prune

Hard-deletes applications older than --days, CVs included. Not reversible, and not meant to be — run it with --dry-run first. With retention set, Pro does this automatically.

hire/applications/resend <id>

Sends the applicant confirmation and the team notification again for one application.