Deprecate and remove cron.php in favour of occ system:cron and the cron route
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, php
Direzione di ricerca
Start by reading core/js/backgroundjobs.js, settings/templates/panels/admin/backgroundjobs.php, and the referenced cron.php CLI and web branches; then check the documentation and Docker images for cron.php crontab examples. The issue lists the intended transition for the next minor and major releases. Done means AJAX mode and admin guidance use the route or occ system:cron, legacy CLI use warns and later exits non-zero, and the web redirect remains for one major before removal.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
cron.php has two jobs today, and neither needs to be a standalone file any more:
- Web (AJAX and webcron modes): it only redirects to the
core.Cron.runroute. - CLI: it shells out to
occ system:cron(see #41895 for why that's fragile: it depends on the working directory, the exit code is lost, andsystem()is often disabled).
We've been telling admins to use occ system:cron for years, but the product still points at cron.php:
core/js/backgroundjobs.js:24calls$.get(OC.webroot+'/cron.php')on every page load in AJAX mode, which is the default.settings/templates/panels/admin/backgroundjobs.php:49and:57tell admins to callcron.phpfor both webcron and system cron (the strings are translated in about 25 l10n files).- Existing webcron registrations and crontab lines (
php -f …/cron.php) in the wild, in docs and Docker images.
Deleting the file now would silently stop background jobs on AJAX-mode installs and on every legacy webcron or crontab setup.
Proposed path
Next minor (non-breaking):
- Point
backgroundjobs.jsat thecore.Cron.runroute instead of/cron.php. - Reword the admin panel: system cron →
occ system:cron, webcron → the route URL. - Check the docs and our Docker images for
cron.phpcrontab lines and switch them to occ. - Make the CLI branch of
cron.phplog and print a deprecation warning.
Next major (breaking):
- CLI branch of
cron.phpexits non-zero with "use occ system:cron" instead of running jobs. - Keep the web redirect for one more major, then remove
cron.php.
- Lingua principale
- PHP
- Stelle
- 8.8k
- Fork
- 2.1k
- Merge medio
- 19h 32m
- PR unite (30g)
- 56
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di owncloud/core
-
Activity page icons previewApertabug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
discussion Type:Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
owncloud/core#37653 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di owncloud/core
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
linuxserver/Heimdall#1626 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
Automattic/static-site-importer#3129 ·
I maintainer di solito rispondono entro 1 giorno
-
Group 2 - Data Storage | Tripal DBX | Chado Group 5 - Search | ElasticSearch | Views Priority - Medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
category::bug code priority::normal
Difficoltà 1/5 1-3 ore Idoneità per principianti 85/100
e0ipso/simple_oauth_21#58 ·
I maintainer di solito rispondono entro 1 giorno