Most of what Business Central does unattended runs through the job queue: scheduled reports, batch posting, integrations, the e-document framework, agent processing. When it stops, things silently do not happen. How the job queue actually runs, the settings that matter, the failure modes, and a monitoring routine that catches a stuck queue before the business does.
The job queue is the part of Business Central that nobody thinks about until the 6am invoice run did not happen, the EDI orders did not come in, or the month-end report was never emailed. It is also where a lot of extension code runs. This is how it works and how to keep it working.
A Job Queue Entry says what to run (a codeunit or a report, with a parameter string and optionally a record), when (a one-off date-time, or a recurrence pattern: days of the week, start and end times, minutes between runs), and under whose identity (the user who set it to Ready; see below). Business Central online runs a scheduler that picks up Ready entries whose time has come and executes each in its own background session. Each run writes a Job Queue Log Entry with the outcome. On error, the entry goes to Error status with the message, and depending on settings retries a number of times.
Three things follow that are not obvious. The job runs as the user who last set it to Ready, with that user's permissions and that user's company, language and settings; if that person leaves and their account is disabled, the job stops. Each run is a separate transaction, and an error anywhere rolls back the whole run. And there is no guarantee two scheduled jobs will not overlap, unless you set a Job Queue Category with a category code, which serialises entries in the same category.
A codeunit with OnRun taking a Job Queue Entry record can be scheduled directly (the parameter string is yours to parse). For work triggered by a user action that should not block the session (send 500 emails, call a slow API), TaskScheduler.CreateTask queues a one-off background run of a codeunit with a failure codeunit; it is the right tool for "do this soon, not now" and it avoids the user waiting on a spinner. For both: make the work idempotent (a retried job must not post twice), log telemetry at start, end and error, and keep each run short enough that a failure loses little.
EnvironmentInformation.IsSandbox).If something did not happen last night and nobody can say why, the job queue log and the telemetry between them almost always can. If nobody in the business looks at either, that is the first fix, and it takes an afternoon.