JobQueue is one of the feature of Zend Plateform. Where you can schedule and manage the execution of php scripts (jobs). The Job Queue can be used to create asynchronous execution of php script and provide, for instance, the scalability of a server.
application
2. What is JobQueue
JobQueue is one of the feature of Zend
Plateform. Where you can schedule and
manage the execution of php scripts (jobs).
The Job Queue can be used to create
asynchronous execution of php script and
provide, for instance, the scalability of a server
application
4. Why we use JobQueue
Web applications usually follow a synchronous
communication model. However,
non-interactive and long-running tasks (such
as report generation) are better suited for
asynchronous execution. One way to off-load
tasks to run at a later time, or even on a
different server, is use the Job Queue module
available as a part of Zend Server 5 (though
not as part of the Community Edition).
6. JobQueue Vs Cronjob
The main advantage of the Job Queue module is
its ability to execute tasks in parallel. Unlike cron
jobs, Job Queue allows:
Running tasks now without waiting for them to
finish (asynchronous execution)
Running tasks once but not right now (deferred
jobs)
Running tasks periodically (recurring jobs like cron,
but with full control over them from through the
PHP API – start, stop, suspend, resume)
Ability to query job status, handle failures, and
re-queue via the API as well as keep track of past,
current, and pending jobs from the GUI.
7. JobQueue Help in our
application
Some examples of asynchronous tasks where Job
Queue
can be helpful are:
Preparing data for the next request
(pre-calculating)
Pre-caching data
Generating periodical reports
Sending e-mails
Cleaning temporary data or files
Communicating with external systems
Background data synchronization with mobile
devices