Skip to content

Commit 0ff01b1

Browse files
author
John Knowles
committed
Cron proposal - Draft 1
1 parent e4ec0cf commit 0ff01b1

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Overview
2+
The cron is one of the most business critical components of Magento, offloading resource
3+
intensive tasks from the user request into the backend and allowing scheduling long running
4+
processes.
5+
6+
The business critical element of the cron needs better supporting in the foundation of the module and
7+
supporting documentation giving better control to developers, technology providers and eCommerce managers.
8+
9+
# Problem
10+
The cron implementation in it's current existence doesn't provide the business critical foundation
11+
or visibility required for a fully functioning eCommerce system.
12+
13+
# Solution - Business Critical Foundation
14+
The cron should be built with a *business critical* foundation. It's responsible for some of the
15+
most critical processes on a Magento implementation; from transactional emails to integrations.
16+
17+
1. Separation
18+
2. Visibility
19+
3. Education
20+
21+
## 1. Separation
22+
Separation of business critical and none business critical processes as part of the core architecture
23+
of the cron. This should be multi threaded "out the box" running business critical processes
24+
in their own threads (Emails, Indexes).
25+
26+
At the foundation no rogue process should ever prevent a business critical operation.
27+
28+
- Multi thread core cron processes out the box
29+
- Process timeouts (Default X minutes and configurable by job)
30+
- Retry limits
31+
- Updated documentation to encourage multi thread setup as standard
32+
33+
34+
## 2. Visibility
35+
On Magento 1 we had the AOE Scheduler which provided us a considerably enhanced user experience. This
36+
module isn't available for Magento 2. Allowing webmasters and developers to clearly see what processes
37+
are running, scheduled and complete gives them greater control and reduces support requests and increases
38+
confidence in the platform.
39+
40+
- Admin visible timeline of scheduled cron tasks (Scheduled, in progress, complete, errored)
41+
- Ability to schedule, delete, remove, pause specific cron tasks.
42+
- Cleanup of redundant processes to reduce noise
43+
- Logging and Alerting
44+
45+
Alternative approach would be a cron dashboard displaying processes in progress, queued and error conditions.
46+
47+
## 3. Education
48+
- Technical documentation for effectively implementing crons into Magento modules
49+
- Setup documentation for correctly implementing multi threaded cron (Standard setup)
50+
51+
# Additional discussion
52+
1. Should RabbitMQ be standard/recommended for certain tasks such as transactional emails and indexes?
53+
2. New Relic currently logging as *unknown* we have an implementation but the Cron module requires work to allow it
54+
55+
# Examples
56+
57+
## Example 1 - Rogue process
58+
A process that connects to an API such as a payment provider could end up getting stuck in a loop
59+
and blocking any other process from progressing currently there is no mechanic in place to
60+
a: Allow other business critical processes to continue aside from defining multiple crontab processes in groups
61+
b: Report or stop the rogue process from continuing until manually spotted
62+
c: No visibility of the processes aside from checking the database
63+
d: No reporting or alerting of the above condition

0 commit comments

Comments
 (0)