Check-in [3947abfec3]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Add allowed `,` separator to cron specifiers. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: | 3947abfec3e85b803166016b24d2ee6cf4d2e7c7 |
User & Date: | mario 2014-11-25 16:48:34 |
Context
2014-11-25
| ||
16:49 | Five tags maximum copied per tweet (still shuffled), JSON API debug msg. check-in: d940e511cb user: mario tags: trunk | |
16:48 | Add allowed `,` separator to cron specifiers. check-in: 3947abfec3 user: mario tags: trunk | |
16:48 | Add #flags/#incoming count to stats (for moderators). check-in: 5d57a1e1ed user: mario tags: trunk | |
Changes
Changes to cron.daily/_cronjobs.php.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
foreach (glob(__DIR__."/*.*") as $fn) { // coarse plugin meta data extraction preg_match_all("~ ^ [#/*\h]+ (?:x-)? (cron|title|description|version|type): \h* (\V+) ~mix", file_get_contents($fn), $m); $m = array_change_key_case(array_combine($m[1], $m[2] )); // assert existing `cron:` specifier if (!empty($m["cron"]) and preg_match("~^([*/\d-]+(\h+|$)){5}$|^@(daily|hourly|midnight)$~", $m["cron"] = stripcslashes($m["cron"]))) { $CRONTAB .= "\n" . "#-- $m[title]\n# ($m[description])\n" . "$m[cron] " . "nice " . pathinfo($fn, PATHINFO_EXTENSION) . " $fn\n"; } } // install new crontab fwrite(popen("crontab", "w"), $CRONTAB); |
| |
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
foreach (glob(__DIR__."/*.*") as $fn) {
// coarse plugin meta data extraction
preg_match_all("~ ^ [#/*\h]+ (?:x-)? (cron|title|description|version|type): \h* (\V+) ~mix", file_get_contents($fn), $m);
$m = array_change_key_case(array_combine($m[1], $m[2] ));
// assert existing `cron:` specifier
if (!empty($m["cron"]) and preg_match("~^([*/\d,-]+(\h+|$)){5}$|^@(daily|hourly|midnight)$~", $m["cron"] = stripcslashes($m["cron"]))) {
$CRONTAB .= "\n"
. "#-- $m[title]\n# ($m[description])\n"
. "$m[cron] "
. "nice "
. pathinfo($fn, PATHINFO_EXTENSION)
. " $fn\n";
}
}
// install new crontab
fwrite(popen("crontab", "w"), $CRONTAB);
|