Deprecate and remove cron.php in favour of occ system:cron and the cron route
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- javascript, php
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- PHP
- Star
- 8.8k
- Fork
- 2.1k
- Merge trung bình
- 19 giờ 32 phút
- Pull request đã merge (30 ngày)
- 56
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của owncloud/core
-
Activity page icons previewĐang mởbug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
discussion Type:Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
owncloud/core#37653 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của owncloud/core
Issue tương tự
-
wpvc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
firefly-iii/firefly-iii#13259 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Sync EN] Document the getLastErrors() return value change in the PHP 8.2 migration guide (#6107)Đang mởsync-en
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày