Index

(jobs)

o2job_queue

integer o2job_queue(string $job_name, array $params, string $host)

Queue for execution job with passed name.
Job is queued for execution but a dedicated batch process is NOT started: some other logic (scheduler) will take care of executing it later.
A list of parameters (by name) can be provided: list will override parameters passed to program called by job.
If a host name is provided then execution is assigned directly to that host, regardless of services logics.
If "" (star) is passed for host parameter then job is queued for all active hosts.
NOTE: If no host name is provided execution can be assigned to local host by application settings: see "jobs_use_local_host" parameter in application settings.
If job exists then new job execution ID is returned, else FALSE.


Parameters:
  1. $job_name
  2. Job name to look for
  3. $params
  4. List of overriding parameters passed to program
  5. $host
  6. Host name to override assigned host/service
Related functions:

o2job_create

o2job_get_by_name

o2job_run

o2job_is_running