1
2# run a specific cron
3curl -X POST 'http://127.0.0.1:8080/wp-includes/mwp/run-cron.php?ts=1628237304&hook=wp_scheduled_delete&hash=40cd750bba9870f18aada2478b24840a'
4
5# list cron
6curl http://127.0.0.1:8080/wp-includes/mwp/list-cron.php
7
8TODO
9- when a hook is executed
10 * remove any future hook_calls (hook_name, hook_hash) from $crons (in-memory)
11 * add a hook_call to $crons based on $hook_call['interval']
12 * call update_option('cron', $crons)
13 - may need a more atomic way of replacing that
14
15This cleans up any duplicate/spammed hooks and makes sure the schedule is actually followed.
16
17
18
19- scanning against list-cron.php
20 * example: P3
21 - 300,000 sites
22 - 10 requests a second
23 => 30,000 seconds
24 => 500 minutes
25 => 8 hours
26
27- throttle based on pod, which we already have in platform db
28 * feedback mechanism for pod health
29- global throttle across all pods (mostly for filer/global resource health)
30
31- keep statistics for each (hook, hook_hash)
32 * runtime
33 * memory (?)
34
35
36- fixed_priority(10) -- woocommerce
37 * decay(scheduled_run_time)
38 * weight(average_hook_cost)
39 * weight(site_specific_hook_cost)
40
41
42