Scheduled jobs (IRPCScheduledJobsAdmin)
Lists, adds, changes, removes, starts and cancels scheduled jobs of the server or of a vault.
Use this interface to add, remove and modify scheduled jobs.
| gRPC service | MFiles.IRPCScheduledJobsAdmin |
|---|---|
| Book and level | Administration API, specialized |
| Methods | 10 |
| Proto file | mfiles/IRPCScheduledJobsAdmin.proto |
Overview
M-Files Admin uses this service for scheduled jobs (backups, vault copies, verification) and for
the archiving and optimization jobs of a vault. A job is a
ScheduledJob: a type, the job details in data, an is_enabled
flag and a schedule. Its state is a
ScheduledJobRunInfo: whether it is running, the last and
next run, errors and progress.
Two job lists. The session decides which jobs a call sees; their IDs are separate.
| Session | Jobs | Rights |
|---|---|---|
Server-level (login_data.vault_guid = null GUID) |
Server jobs: backup, restore, copy vault, verify vault, recalculate property, migrate vault, encrypt file data, and optimize vault | Server right manage_jobs (system administrator server role) |
| Vault session | The vault's jobs: archive objects, archive old versions, restore from archive, optimize vault | Vault rights archive and restore_from_archive, or manage_scheduled_jobs; optimize vault jobs need manage_scheduled_jobs |
A server job cannot be handled in a vault session, and archiving jobs only in a session of their
vault. A vault administrator therefore manages the vault's archiving and optimization jobs but
not backups. Exceptions for server jobs: reading, starting and cancelling recalculate property
jobs, and reading verify vault jobs, do not need manage_jobs. Archiving jobs also need a
license that includes archiving. Missing rights fail with "Access denied.".
Typical calls: GetScheduledJobs to list,
AddScheduledJob /
ModifyScheduledJob /
RemoveScheduledJob to maintain,
StartScheduledJob to run one now, then
poll GetScheduledJobRunInfo
until is_running is false.
Unset times. In run info, "never" or "no next run" is the timestamp 1601-01-01T00:00:00Z, not an unset field.
Methods
| Method | Summary | Facts |
|---|---|---|
| AddScheduledJob | Adds a scheduled job to the server or to the vault, depending on the job type. | admin session |
| CancelScheduledJob | Asks a running scheduled job to stop. | admin session idempotent |
| DownloadScheduledJobOutputFile_ReadBlock | Reads a block of a job output file, such as the summary of a restore from archive preview. | admin session idempotent |
| GetScheduledJob | Gets one scheduled job and its run state. | admin session idempotent |
| GetScheduledJobRunInfo | Gets the run state of a scheduled job: running or not, last and next run, errors and progress. | admin session idempotent |
| GetScheduledJobs | Gets the scheduled jobs of the server (server-level session) or of the vault (vault session), with their run state. | admin session idempotent |
| ModifyScheduledJob | Replaces the definition of an existing scheduled job. | admin session idempotent |
| RemoveScheduledJob | Removes a scheduled job. | admin session |
| ResetScheduledJobProgress | Resets the saved progress of an optimize vault job, so that its next run retries the failed step or starts over. | admin session idempotent |
| StartScheduledJob | Runs a scheduled job now, outside its schedule. | admin session idempotent |