Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.1] [SOC 21] Add a Scheduled Tasks Infrastructure to Joomla #35143

Merged
merged 670 commits into from
Nov 26, 2021
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
670 commits
Select commit Hold shift + click to select a range
40a5707
Fix task filter ordering
ditsuke Sep 1, 2021
ce3244a
Improve com_scheduler language strings
ditsuke Sep 1, 2021
4edb1e0
Merge branch 'dcon' into 'ditsuke/dcon'
ditsuke Sep 1, 2021
39e29c5
Scheduler runner as a shutdown_function
ditsuke Sep 4, 2021
7b945bf
Enhance task locks and events
ditsuke Sep 5, 2021
5657e20
Add a sanity check to TaskPluginTrait
ditsuke Sep 5, 2021
fa7f03b
Fix fatal task failure check
ditsuke Sep 5, 2021
f139b51
Increase scheduler plugin hook priority
ditsuke Sep 5, 2021
c6e7e82
Fix event dispatchers in the Task class
ditsuke Sep 5, 2021
09892db
Cleanup com_scheduler manifest
ditsuke Sep 6, 2021
46bd367
Add filtering by lock state in TasksModel
ditsuke Sep 6, 2021
06d8fa0
Add task timeout config to "com_scheduler"
ditsuke Sep 6, 2021
28c8361
Update language file for "com_scheduler"
ditsuke Sep 6, 2021
6f5d0f0
Bugfix and update Scheduler API class
ditsuke Sep 6, 2021
595a21f
Add priority column to `#__scheduler_tasks`
ditsuke Sep 7, 2021
d77353d
Add task priority to Task form and filter form
ditsuke Sep 7, 2021
ef9d44f
Add priority, multi-ordering support to TasksModel
ditsuke Sep 7, 2021
0dfaee0
Update task timeout with config fetch
ditsuke Sep 7, 2021
4b25f26
Add priority-aware task queue to Scheduler class
ditsuke Sep 7, 2021
aef5836
Update language files for com_scheduler
ditsuke Sep 7, 2021
ff14b57
Bugfix and add an 'Advanced' tab to the task form
ditsuke Sep 7, 2021
5034f02
Enhance orphan task handling in Task driver
ditsuke Sep 7, 2021
0fa3318
Enhance orphan handling in Scheduler, update lang
ditsuke Sep 7, 2021
c0270ae
Add demo task routines to stress memory
ditsuke Sep 9, 2021
f395a76
Add sleep demo task routine
ditsuke Sep 9, 2021
0319fee
Update language files for plgTaskDemotasks
ditsuke Sep 9, 2021
6d649bc
Cleanup and bugfix com_scheduler
ditsuke Sep 11, 2021
7f9e52d
Improve consistency, extend `#__scheduler_tasks`
ditsuke Sep 11, 2021
b343eaa
Remove language autoload from ScheduleRunner
ditsuke Sep 11, 2021
33e6c96
Merge branch dcon into 'ditsuke/dcon'
ditsuke Sep 11, 2021
619b47f
Fix missed errant cast
ditsuke Sep 11, 2021
167fadb
Patch Task::releaseLock()
ditsuke Sep 12, 2021
2a4c8e4
Add plgSystemTaskNotification
ditsuke Sep 13, 2021
f1b5aca
Add language files for plgSystemTaskNotifications
ditsuke Sep 13, 2021
7256162
Add SQL DDL for task notification mail templates
ditsuke Sep 13, 2021
e3e1c36
Add auto-install SQL (plgSystemTaskNotifications)
ditsuke Sep 13, 2021
dbe4f98
Add language autoload for plgSysTaskNotification
ditsuke Sep 13, 2021
6954cd7
Patch auto-install SQL scripts
ditsuke Sep 13, 2021
ca01cee
Cleanup plg taskNotification
ditsuke Sep 13, 2021
5bd8870
Fix Scheduler::fetchTasks() default behaviour
ditsuke Sep 13, 2021
71e5501
Add explicit id, title filtering to TasksModel
ditsuke Sep 14, 2021
395a822
Enhance ExecRuleHelper::nextExec()
ditsuke Sep 14, 2021
dc7bd30
Add new Task::Status constant
ditsuke Sep 14, 2021
03ae357
Improve comments in the TaskOption class
ditsuke Sep 14, 2021
b0470d6
Update the Scheduler class
ditsuke Sep 14, 2021
89b5ffc
Bugfix Task::skipExecution()
ditsuke Sep 14, 2021
47cce8c
Add scheduler:list console command
ditsuke Sep 17, 2021
f662964
Add scheduler:run command
ditsuke Sep 17, 2021
585ff22
Add autoload for new commands
ditsuke Sep 17, 2021
573ab73
Merge branch 'dcon' into 'ditsuke/dcon'
ditsuke Sep 17, 2021
b9ef576
Add plugin plgTaskCheckFiles
ditsuke Sep 17, 2021
629a9cb
Enhance form for image size routine
ditsuke Sep 18, 2021
aa80009
Update form for get_request routine
ditsuke Sep 18, 2021
e050cd1
Update language file for com_scheduler
ditsuke Sep 18, 2021
cc4106e
Patch task form
ditsuke Sep 18, 2021
98a7451
Merge branch 'dcon' into 'ditsuke/dcon'
ditsuke Sep 18, 2021
a9a72d0
Patch exit handling in Task class
ditsuke Sep 18, 2021
2e06126
Patch exit handling in Task class
ditsuke Sep 18, 2021
f0dcb33
Add support for mailing task outputs
ditsuke Sep 18, 2021
2a78316
Update SQL for task notification templates
ditsuke Sep 18, 2021
85f1161
Add output file support in GET request routine
ditsuke Sep 18, 2021
a34d6cd
Patch task class
ditsuke Sep 18, 2021
ae7a652
Disable deprecated routineEndMessage [CheckFiles]
ditsuke Sep 18, 2021
30caaa6
Improve code quality, consistency and style
ditsuke Sep 23, 2021
f32a977
Make SchedulerHelper abstract
ditsuke Sep 23, 2021
f1d47e7
Add request hash protection for scheduler runner
ditsuke Sep 29, 2021
27b8dff
Bugfix scheduleRunner event subscription behaviour
ditsuke Sep 29, 2021
550fb96
Add rule for manual-only task invocation
ditsuke Sep 29, 2021
60d0c47
Refactor and extend TaskModel, TaskTable
ditsuke Sep 29, 2021
ae62135
Update ExecRuleHelper
ditsuke Sep 30, 2021
728683c
Update language constants for com_scheduler
ditsuke Sep 30, 2021
7176ba6
Cleanup Task class
ditsuke Sep 30, 2021
f2c1b3d
Update com_scheduler manifest
ditsuke Sep 30, 2021
71d08cd
Merge branch 'dcon' into 'ditsuke/dcon'
ditsuke Oct 1, 2021
98a6d70
Apply code-style suggestions from code review
ditsuke Oct 1, 2021
57c557e
Apply code-style suggestions from code review
ditsuke Oct 1, 2021
d8a92bc
Merge branch '4.1-dev' of github.com:joomla/joomla-cms into dcon
bembelimen Oct 2, 2021
ba0a60d
Merge branch 'dcon' of https://github.com/joomla-projects/soc21_websi…
ditsuke Oct 3, 2021
b9072c7
Clean up usage
bembelimen Oct 4, 2021
14e1c83
Add AJAX requests script to scheduleRunner
ditsuke Oct 5, 2021
2075626
Update manifest for plgSystemScheduleRunner
ditsuke Oct 5, 2021
e102278
Add scheduleRunner listener to inject JS
ditsuke Oct 5, 2021
5c0c297
Add scheduleRunner doc and missing checks
ditsuke Oct 5, 2021
fa8e09c
Merge PR#24 (cleanup)
ditsuke Oct 5, 2021
895a066
Fix `created_by` auto set on task save
ditsuke Oct 6, 2021
c72235d
Cleanup and enhance TaskTable docs
ditsuke Oct 6, 2021
4e4711c
Fix plugin manifests
ditsuke Oct 6, 2021
13888ea
Revert changes to the modules/select template
ditsuke Oct 6, 2021
518dff7
Add standard routine handler
ditsuke Oct 9, 2021
8877509
Fix copyright formatting
ditsuke Oct 9, 2021
b9064c2
Update Task\Status
ditsuke Oct 9, 2021
f996191
Refactor TaskPluginTrait
ditsuke Oct 9, 2021
bc7933d
Improve TaskPluginTrait documentation
ditsuke Oct 9, 2021
c521a5b
Implement suggestions on TaskPluginTrait
ditsuke Oct 10, 2021
7ae1a64
Update TaskPluginTrait::standardRoutineHandler()
ditsuke Oct 10, 2021
8d41c26
Update task plugins
ditsuke Oct 10, 2021
09603f0
Ignore user aborts on scheduler trigger
ditsuke Oct 10, 2021
be5d3a9
Update TaskPluginTrait doc
ditsuke Oct 10, 2021
24bdb1e
Rename status code
ditsuke Oct 11, 2021
d30d0c7
Add config options for scheduleRunner
ditsuke Oct 16, 2021
86b525f
Merge branch 'ajax-trigger' into dcon
ditsuke Oct 21, 2021
40ea8f8
Merge branch 'refactor-task-plugin-trait' into dcon
ditsuke Oct 21, 2021
d8c6585
Merge branch 'dcon' into 'ditsuke/dcon'
ditsuke Oct 22, 2021
ec6d38e
Add removal of time limit on task runs
bembelimen Oct 25, 2021
1e14d61
Fix broken interval run when setting custom value
bembelimen Oct 25, 2021
5d8f4f2
Set correct lazyCron URL and run it at the beginning
bembelimen Oct 25, 2021
c7595d2
Merge branch 'fix-task-created-by' into 'dcon'
ditsuke Oct 25, 2021
e367b95
Merge branch 'dcon' of github.com:joomla-projects/soc21_website-cronj…
bembelimen Oct 26, 2021
9af7cc4
Rebuild JS
bembelimen Oct 26, 2021
63bf24b
Finish test cron
bembelimen Oct 27, 2021
7a015df
Fix CS
bembelimen Oct 27, 2021
4ebbc00
Revert SQL query
bembelimen Oct 27, 2021
5ff273f
Add webcron to scheduler config
ditsuke Oct 27, 2021
7a25797
Add webcron key autogen and more to Schedulerunner
ditsuke Oct 27, 2021
adbe28f
Add custom field for webcron link
ditsuke Oct 27, 2021
a87ef9d
Update com_scheduler language file
ditsuke Oct 27, 2021
e281dd9
Merge 'origin/soc/scheduler/play-button' into webcron-key
ditsuke Oct 27, 2021
6fe5542
Fix regression in Scheduler class
ditsuke Oct 27, 2021
09ca90b
Fix test run JS
ditsuke Oct 28, 2021
4e6c8f4
Improve form manipulation code
ditsuke Oct 28, 2021
431591d
Clean up redundant field from Tasks table
ditsuke Oct 29, 2021
954b325
Remove global task configuration config
ditsuke Oct 29, 2021
983ee47
Add task notification config as injected form
ditsuke Oct 29, 2021
2973ad8
Improve plgSystemTaskNotification code style
ditsuke Oct 29, 2021
60e8eb0
Fix params display in task view
bembelimen Oct 29, 2021
b3cb99f
Add fieldset labels for task form
ditsuke Oct 30, 2021
31e9b8f
Update task notification logic
ditsuke Oct 31, 2021
daffabb
Update plgSystemTaskNotification language file
ditsuke Oct 31, 2021
3c1158e
Merge branch 'soc/scheduler/play-button' into dcon
ditsuke Oct 31, 2021
9b5ddbf
Merge branch 'task-notifications-2' into dcon
ditsuke Oct 31, 2021
eb126f2
Fix Task driver behavior
ditsuke Oct 31, 2021
c3c83d6
Fix TasksRunCommand regression
ditsuke Oct 31, 2021
064f76f
Fix scheduleRunner default behaviour
ditsuke Oct 31, 2021
882a5f6
Update scheduleRunner language files
ditsuke Oct 31, 2021
9fea821
Update and fix code-style
ditsuke Oct 31, 2021
7f87639
Merge branch 'dcon' into 'ditsuke/dcon'
ditsuke Oct 31, 2021
61c5d1e
Merge branch 'joomla-cms/4.1-dev' into 'dcon'
ditsuke Oct 31, 2021
65f9425
Merge branch 'dcon' into ditsuke-dcon
ditsuke Oct 31, 2021
a3fcfe6
Revert drone
ditsuke Oct 31, 2021
4ebdf24
Update com_scheduler language file
ditsuke Oct 31, 2021
b6f4dcc
merge branch 'dcon' into 'ditsuke/dcon'
ditsuke Nov 1, 2021
d13b286
Apply suggestions from code review
ditsuke Nov 1, 2021
cd4428b
Apply suggestions from code review
ditsuke Nov 1, 2021
e2f2c65
Update language constants for plgSysScheduleRunner
ditsuke Nov 1, 2021
06f12b8
Merge branch 'dcon' into ditsuke-dcon
ditsuke Nov 1, 2021
1c938dd
Bugfix Task::run()
ditsuke Nov 1, 2021
8df53d5
Merge branch 'dcon' into ditsuke-dcon
ditsuke Nov 1, 2021
7f25375
Fix webcron url & description
ditsuke Nov 2, 2021
51aef6f
Merge branch 'fix-webcron-url' into 'dcon'
ditsuke Nov 2, 2021
8a43d20
Merge branch 'dcon' into 'ditsuke/dcon'
ditsuke Nov 2, 2021
1a8038b
Update joomla.asset.json
bembelimen Nov 3, 2021
233fd3a
Improve the locking mechanism
bembelimen Nov 6, 2021
bda45f8
Add table locking when locking task
bembelimen Nov 6, 2021
b206a97
CS
bembelimen Nov 6, 2021
ed0fc7a
Simplify null date check
bembelimen Nov 6, 2021
fab13fa
Add column quote
bembelimen Nov 6, 2021
5b76026
Extend TaskModel's getter method
ditsuke Nov 9, 2021
d7d0605
Update Scheduler::getTask() and runTask()
ditsuke Nov 9, 2021
e46a143
Fix typos and improve static analysis support
ditsuke Nov 9, 2021
e2e61ad
Update/fix Schedulerunner
ditsuke Nov 9, 2021
7495b04
Update Task class
ditsuke Nov 9, 2021
e39fe8d
Update Task::releaseLock()
ditsuke Nov 10, 2021
d3e518b
Update TaskModel::getTask()
ditsuke Nov 10, 2021
da30f73
Improve TaskModel::getTask() mysql compat
ditsuke Nov 10, 2021
a370a15
Add unlock function
bembelimen Nov 13, 2021
34d2e85
Fix language strings for the schedulerunner plugin
bembelimen Nov 13, 2021
884ac0c
Update description and remove plugin files
bembelimen Nov 13, 2021
c4c6988
Implement Scheduler CLI state changer
bembelimen Nov 13, 2021
98ab295
Update TasksStateCommand.php
bembelimen Nov 13, 2021
e6a1feb
Fix list state filter in scheduler
bembelimen Nov 13, 2021
951d29b
Merge pull request #46 from joomla-projects/soc/scheduler/list-filter…
ditsuke Nov 14, 2021
79a5bf9
Fix MySQL lock violations
ditsuke Nov 14, 2021
80cec24
Fix label a11y [#42]
ditsuke Nov 14, 2021
72916fa
Quote 'id'
ditsuke Nov 15, 2021
ce53244
Merge pull request #44 from joomla-projects/soc/scheduler/plugin-lang…
ditsuke Nov 15, 2021
12d2006
update publish/unpublish => enable/disable
ditsuke Nov 15, 2021
343f8bf
Add check for checked out tasks
ditsuke Nov 15, 2021
0b45eb8
Improve static analysis support.
ditsuke Nov 15, 2021
c4cd19a
Update exit codes and fix typos
ditsuke Nov 15, 2021
0d14e27
Merge pull request #45 from joomla-projects/soc/scheduler/cli
ditsuke Nov 15, 2021
3a68dcb
Merge pull request #43 from joomla-projects/soc/scheduler/unlock
ditsuke Nov 15, 2021
01f75ef
Cleanup
ditsuke Nov 15, 2021
0ed7ff4
Improve task locking for concurrency safety and simplify design
ditsuke Nov 15, 2021
0336149
Fix SQL scripts
ditsuke Nov 15, 2021
358ca7b
Apply Code-style and doc-block improvements from code review
ditsuke Nov 15, 2021
372aef1
Replace Registry inheritance with composition
ditsuke Nov 15, 2021
922947e
Refactor Task::isSuccess()
ditsuke Nov 15, 2021
df51ee5
Apply Code-style and doc-block improvements from code review
ditsuke Nov 15, 2021
b37c248
Update doc-blocks for the Task driver
ditsuke Nov 15, 2021
f8895a7
Merge branch 'task-refactor' into 'dcon'
ditsuke Nov 15, 2021
74a0ef7
Merge branch 4.1-dev of 'joomla/joomla-cms' into 'dcon'
ditsuke Nov 15, 2021
42162fb
Merge branch 'dcon' into 'ditsuke/dcon'
ditsuke Nov 15, 2021
530c93e
Update composer.lock
ditsuke Nov 15, 2021
d39ae95
Update composer.lock
ditsuke Nov 15, 2021
7ffa79c
Make Task property getter public [bug]
ditsuke Nov 19, 2021
6030939
Improve task routine exception handling
ditsuke Nov 19, 2021
1ec6550
Update plgScheduleRunner
ditsuke Nov 19, 2021
0660655
Update Task::Status
ditsuke Nov 19, 2021
dcce361
Fix exception handling in TaskPluginTrait
ditsuke Nov 19, 2021
b6716b1
Cleanup assert exception refs
ditsuke Nov 19, 2021
3c56911
Improve ScheduleRunner documentation.
ditsuke Nov 19, 2021
70e0eab
Improve code style
ditsuke Nov 19, 2021
04ce0ea
Fix demo task form
ditsuke Nov 19, 2021
55b504f
Update language file for `com_scheduler`
ditsuke Nov 19, 2021
0efe6e4
Use output buffering for lazyCron to avoid dying
ditsuke Nov 19, 2021
6625ef9
Merge update SQL
ditsuke Nov 20, 2021
1dc9678
Update plgTaskCheckfiles
ditsuke Nov 20, 2021
bfe8075
Merge branch 'dcon' into 'ditsuke/dcon'
ditsuke Nov 20, 2021
1033d6b
Update scheduleRunner docs
ditsuke Nov 20, 2021
48b7d3f
Improve code quality for task unlocking
ditsuke Nov 20, 2021
9e0d9ed
Fix com_scheduler, task plugin code-style
ditsuke Nov 20, 2021
21db0e0
Merge branch 'dcon' into 'ditsuke/dcon'
ditsuke Nov 20, 2021
1e20851
Fix WebcronLinkField::getLayoutPaths()
ditsuke Nov 20, 2021
ac4eb03
Merge more update SQL
ditsuke Nov 20, 2021
46b7192
Rename update SQL
ditsuke Nov 20, 2021
488523f
Make plgTaskCheckfiles logging translatable
ditsuke Nov 20, 2021
2909485
Update plgTaskRequests
ditsuke Nov 20, 2021
338e98d
Improve exception handling plgTaskCheckfiles
ditsuke Nov 20, 2021
b1a4b4d
Update code-style and language
ditsuke Nov 20, 2021
34c0de3
Merge branch 'dcon' into 'ditsuke/dcon'
ditsuke Nov 20, 2021
f9aba46
Merge branch '4.1-dev' into dcon
bembelimen Nov 21, 2021
f4792d3
Fix installation and update SQL scripts
richard67 Nov 21, 2021
1549e1f
Fix update SQL for PostgreSQL for the database checker
richard67 Nov 21, 2021
75b0b31
Add new core extensions to the extensions helper
richard67 Nov 21, 2021
e541b57
Merge pull request #49 from richard67/dcon-sql-fixes
ditsuke Nov 22, 2021
dd04410
Merge pull request #50 from richard67/dcon-extensions-helper-core-ext…
ditsuke Nov 22, 2021
22e852a
Add auto-install SQL for plg_task_checkfiles
ditsuke Nov 22, 2021
33487f1
Merge branch 'dcon' into 'ditsuke/dcon'
ditsuke Nov 22, 2021
7f5e422
Add DB column for cli exclusive tasks
ditsuke Nov 22, 2021
e183ea9
Add support for CLI exclusive tasks
ditsuke Nov 22, 2021
dd31ecf
Add comments, fix doc signatures + style
ditsuke Nov 22, 2021
f85c536
Merge pull request #51 from joomla-projects/feat-cli-only-tasks
ditsuke Nov 22, 2021
1b4686c
Merge branch 'dcon' into 'ditsuke/dcon'
ditsuke Nov 22, 2021
16b07a8
Merge branch '4.1-dev' into dcon
bembelimen Nov 22, 2021
03dbcf1
Fix get request response body
ditsuke Nov 22, 2021
a3fcd96
Merge branch 'dcon' into 'ditsuke/dcon'
ditsuke Nov 22, 2021
5537d97
Add `Scheduler::run()` option for concurrency
ditsuke Nov 24, 2021
5314a89
Update plgSystemSchedulerunner
ditsuke Nov 24, 2021
7a4e651
Make `scheduler:run` safer
ditsuke Nov 24, 2021
865bb7a
Refactor `scheduler:state`
ditsuke Nov 24, 2021
90990fc
Improve `scheduler:run` description style
ditsuke Nov 24, 2021
6252e72
Add utilities, bugfix Task class
ditsuke Nov 24, 2021
d1ec907
Improve `scheduler:state` command
ditsuke Nov 24, 2021
9f776a7
Add page reload after testing
bembelimen Nov 25, 2021
6526ce9
Code sniffer fixes
bembelimen Nov 25, 2021
67bcba9
Merge branch 'cli-fixes' into 'dcon'
ditsuke Nov 26, 2021
67c962a
Merge branch 'soc/scheduler/testrundate' into 'dcon'
ditsuke Nov 26, 2021
e0be228
Rename param for Scheduler::fetchTaskRecord()
ditsuke Nov 26, 2021
1eee2da
Merge remote branch 'joomla-cms/4.1-dev' into 'dcon'
ditsuke Nov 26, 2021
4a44765
Merge branch 'dcon' into 'ditsuke/dcon'
ditsuke Nov 26, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion administrator/components/com_actionlogs/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
type="logtype"
label="COM_ACTIONLOGS_LOG_EXTENSIONS_LABEL"
multiple="true"
default="com_banners,com_cache,com_categories,com_checkin,com_config,com_contact,com_content,com_installer,com_media,com_menus,com_messages,com_modules,com_newsfeeds,com_plugins,com_redirect,com_tags,com_templates,com_users"
default="com_banners,com_cache,com_categories,com_checkin,com_config,com_contact,com_content,com_installer,com_media,com_menus,com_messages,com_modules,com_newsfeeds,com_plugins,com_redirect,com_scheduler,com_tags,com_templates,com_users"
/>
<field
name="loggable_api"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- Add `com_scheduler` to `#__extensions`
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`,
`protected`, `locked`, `manifest_cache`, `params`, `custom_data`)
VALUES (0, 'com_scheduler', 'component', 'com_scheduler', '', 1, 1, 1, 0, 1, '', '', '');

-- Add `plg_task_demotasks` to `#__extensions`
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`,
`protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`)
VALUES (0, 'plg_task_demotasks', 'plugin', 'demotasks', 'task', 0, 1, 1, 0, 0, '', '{}', '', 15, 0);
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
--
-- Table structure for table `#__scheduler_tasks`
--

CREATE TABLE IF NOT EXISTS `#__scheduler_tasks` (
`id` int unsigned NOT NULL AUTO_INCREMENT,
`asset_id` int NOT NULL UNIQUE DEFAULT '0',
`title` varchar(255) NOT NULL DEFAULT '',
`type` varchar(1024) NOT NULL COMMENT 'unique identifier for job defined by plugin',
-- Trigger type, default to PseudoCron (compatible everywhere).
`trigger` enum ('pseudo_cron', 'cron', 'visit_count') NOT NULL DEFAULT 'pseudo_cron' COMMENT 'Defines how job is triggered',
`execution_rules` text COMMENT 'Execution Rules, Unprocessed',
`cron_rules` text COMMENT 'Processed execution rules, crontab-like JSON form',
`state` tinyint NOT NULL DEFAULT FALSE,
`last_exit_code` int NOT NULL DEFAULT '0' COMMENT 'Exit code when job was last run',
`last_execution` datetime COMMENT 'Timestamp of last run',
`next_execution` datetime COMMENT 'Timestamp of next (planned) run, referred for execution on trigger',
`times_executed` int DEFAULT '0' COMMENT 'Count of successful triggers',
`times_failed` int DEFAULT '0' COMMENT 'Count of failures',
`locked` datetime,
`priority` smallint NOT NULL DEFAULT '0',
`ordering` int NOT NULL DEFAULT 0 COMMENT 'Configurable list ordering',
`params` text NOT NULL,
`note` text,
`created` datetime NOT NULL,
`created_by` int UNSIGNED NOT NULL DEFAULT '0',
`checked_out` int unsigned,
`checked_out_time` datetime,
PRIMARY KEY (id),
KEY `idx_type` (`type`),
KEY `idx_state` (`state`),
KEY `idx_last_exit` (`last_exit_code`),
KEY `idx_next_exec` (`next_execution`),
KEY `idx_locked` (`locked`),
KEY `idx_priority` (`priority`),
KEY `idx_checked_out` (`checked_out`)
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 DEFAULT COLLATE = utf8mb4_unicode_ci;
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
INSERT INTO `#__mail_templates` (`template_id`, `extension`, `language`, `subject`, `body`, `htmlbody`, `attachments`, `params`) VALUES
('plg_system_tasknotification.failure_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_FAILURE_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_FAILURE_MAIL_BODY', '', '', '{"tags": ["task_id", "task_title", "exit_code", "exec_data_time"]}'),
('plg_system_tasknotification.fatal_recovery_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_FATAL_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_FATAL_MAIL_BODY', '', '', '{"tags": ["task_id", "task_title"]}'),
('plg_system_tasknotification.orphan_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_ORPHAN_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_ORPHAN_MAIL_BODY', '', '', '{"tags": ["task_id", "task_title", ""]}'),
('plg_system_tasknotification.success_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_SUCCESS_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_SUCCESS_MAIL_BODY', '', '', '{"tags":["task_id", "task_title", "exec_data_time"]}');
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- Add "com_scheduler" to "#__extensions"
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access",
"protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state")
VALUES (0, 'com_scheduler', 'component', 'com_scheduler', '', 1, 1, 1, 0, 1, '', '{}', '', 0, 0);

-- Add "plg_task_demotasks" to "#__extensions"
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access",
"protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state")
VALUES (0, 'plg_task_demotasks', 'plugin', 'demotasks', 'task', 0, 1, 1, 0, 0, '', '{}', '', 15, 0);
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
--
-- Table structure for table "#__scheduler_tasks"
--

CREATE TABLE IF NOT EXISTS "#__scheduler_tasks"
(
"id" serial NOT NULL,
"asset_id" bigint NOT NULL DEFAULT '0',
"title" varchar(255) NOT NULL,
"type" varchar(1024) NOT NULL,
"execution_rules" text,
"cron_rules" text,
"trigger" varchar(12) NOT NULL DEFAULT 'pseudo_cron',
"state" smallint NOT NULL DEFAULT '0',
"last_exit_code" int NOT NULL DEFAULT '0',
"last_execution" timestamp without time zone,
"next_execution" timestamp without time zone,
"times_executed" int NOT NULL DEFAULT '0',
"times_failed" int DEFAULT '0',
"locked" timestamp without time zone,
"priority" smallint NOT NULL DEFAULT '0',
"ordering" bigint DEFAULT 0 NOT NULL,
"params" text NOT NULL,
"note" text DEFAULT '',
"created" timestamp without time zone NOT NULL,
"created_by" bigint NOT NULL DEFAULT '0',
"checked_out" integer,
"checked_out_time" timestamp without time zone,
PRIMARY KEY ("id")
);

CREATE INDEX "#__scheduler_tasks_idx_type" ON "#__scheduler_tasks" ("type");
CREATE INDEX "#__scheduler_tasks_idx_state" ON "#__scheduler_tasks" ("state");
CREATE INDEX "#__scheduler_tasks_idx_last_exit" ON "#__scheduler_tasks" ("last_exit_code");
CREATE INDEX "#__scheduler_tasks_idx_next_exec" ON "#__scheduler_tasks" ("next_execution");
CREATE INDEX "#__scheduler_tasks_idx_locked" ON "#__scheduler_tasks" ("locked");
CREATE INDEX "#__scheduler_tasks_idx_priority" ON "#__scheduler_tasks" ("priority");
CREATE INDEX "#__scheduler_tasks_idx_checked_out" ON "#__scheduler_tasks" ("checked_out");
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
INSERT INTO "#__mail_templates" ("template_id", "extension", "language", "subject", "body", "htmlbody", "attachments", "params") VALUES
('plg_system_tasknotification.failure_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_FAILURE_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_FAILURE_MAIL_BODY', '', '', '{"tags": ["task_id", "task_title", "exit_code", "exec_data_time"]}'),
('plg_system_tasknotification.fatal_recovery_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_FATAL_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_FATAL_MAIL_BODY', '', '', '{"tags": ["task_id", "task_title"]}'),
('plg_system_tasknotification.orphan_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_ORPHAN_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_ORPHAN_MAIL_BODY', '', '', '{"tags": ["task_id", "task_title", ""]}'),
('plg_system_tasknotification.success_mail', 'plg_system_tasknotification', '', 'PLG_SYSTEM_TASK_NOTIFICATION_SUCCESS_MAIL_SUBJECT', 'PLG_SYSTEM_TASK_NOTIFICATION_SUCCESS_MAIL_BODY', '', '', '{"tags":["task_id", "task_title", "exec_data_time"]}');
8 changes: 8 additions & 0 deletions administrator/components/com_menus/presets/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,14 @@
permission="core.manage;com_redirect"
/>

<menuitem
title="MOD_MENU_MANAGE_SCHEDULED_TASKS"
type="component"
element="com_scheduler"
link="index.php?option=com_scheduler&amp;view=tasks"
permission="core.manage;com_scheduler"
/>

<menuitem
title="MOD_MENU_EXTENSIONS_MODULE_MANAGER_SITE"
type="component"
Expand Down
3 changes: 2 additions & 1 deletion administrator/components/com_modules/tmpl/select/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
* phpcs:ignoreFile
ditsuke marked this conversation as resolved.
Show resolved Hide resolved
*/

defined('_JEXEC') or die;
Expand Down Expand Up @@ -57,7 +58,7 @@ class="form-control" id="comModulesSelectSearch"
<?php echo Text::_('COM_MODULES_TYPE_CHOOSE'); ?>
</h2>
<div class="main-card card-columns p-4" id="comModulesSelectResultsContainer">
<?php foreach ($this->items as &$item) : ?>
<?php foreach ($this->items as $item) : ?>
<?php // Prepare variables for the link. ?>
<?php $link = 'index.php?option=com_modules&task=module.add&client_id=' . $this->state->get('client_id', 0) . $this->modalLink . '&eid=' . $item->extension_id; ?>
<?php $name = $this->escape($item->name); ?>
Expand Down
17 changes: 17 additions & 0 deletions administrator/components/com_scheduler/access.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<access component="com_scheduler">
<section name="component">
<action name="core.admin" title="JACTION_ADMIN"/>
<action name="core.options" title="JACTION_OPTIONS"/>
<action name="core.manage" title="JACTION_MANAGE"/>
<action name="core.create" title="JACTION_CREATE"/>
<action name="core.delete" title="JACTION_DELETE"/>
<action name="core.edit" title="JACTION_EDIT"/>
<action name="core.edit.state" title="JACTION_EDITSTATE"/>
</section>
<section name="task">
<action name="core.delete" title="JACTION_DELETE"/>
<action name="core.edit" title="JACTION_EDIT"/>
<action name="core.edit.state" title="JACTION_EDITSTATE"/>
</section>
</access>
34 changes: 34 additions & 0 deletions administrator/components/com_scheduler/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<config>
<fieldset
name="task_config"
label="COM_SCHEDULER_CONFIG_LABEL_TASKS"
>
<field
name="timeout"
type="number"
label="COM_SCHEDULER_CONFIG_LABEL_TIMEOUT"
default="300"
required="true"
min="10"
step="1"
validate="number"
filter="int"
/>
</fieldset>
<fieldset
name="permissions"
label="JCONFIG_PERMISSIONS_LABEL"
description="JCONFIG_PERMISSIONS_DESC"
>
<field
name="rules"
type="rules"
label="JCONFIG_PERMISSIONS_LABEL"
validate="rules"
filter="rules"
section="component"
component="com_scheduler"
/>
</fieldset>
</config>
74 changes: 74 additions & 0 deletions administrator/components/com_scheduler/forms/filter_tasks.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<form addfieldprefix="Joomla\Component\Scheduler\Administrator\Field">
<fields name="filter">
<field
name="search"
type="text"
label="COM_SCHEDULER_FILTER_SEARCH_LABEL"
description="COM_SCHEDULER_FILTER_SEARCH_DESC"
inputmode="search"
hint="JSEARCH_FILTER"
/>
<field
name="state"
type="taskState"
label="JSTATUS"
onchange="this.form.submit();"
validate="options"
>
<option value="">JOPTION_SELECT_PUBLISHED</option>
</field>
<field
name="type"
type="taskType"
label="COM_SCHEDULER_HEADING_TASK_TYPE"
onchange="this.form.submit();"
>
<option value="">COM_SCHEDULER_SELECT_TYPE</option>
</field>
<field
name="orphaned"
type="list"
label="COM_SCHEDULER_FIELD_LABEL_SHOW_ORPHANED"
default="-1"
onchange="this.form.submit()"
>
<option value="-1">COM_SCHEDULER_OPTION_ORPHANED_HIDE</option>
<option value="0">COM_SCHEDULER_OPTION_ORPHANED_SHOW</option>
<option value="1">COM_SCHEDULER_OPTION_ORPHANED_ONLY</option>
</field>
</fields>

<fields name="list">
<!-- @todo: Add options for execution date(s) -->
<field
name="fullordering"
type="list"
label="JGLOBAL_SORT_BY"
onchange="this.form.submit();"
default="a.title DESC"
validate="options"
>
<option value="">JGLOBAL_SORT_BY</option>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This list should be sorted to match the order of the displayed columns

<option value="a.id ASC">JGRID_HEADING_ID_ASC</option>
<option value="a.id DESC">JGRID_HEADING_ID_DESC</option>
<option value="a.title ASC">JGLOBAL_TITLE_ASC</option>
<option value="a.title DESC">JGLOBAL_TITLE_DESC</option>
<option value="j.type_title ASC">COM_SCHEDULER_TASK_TYPE_ASC</option>
<option value="j.type_title DESC">COM_SCHEDULER_TASK_TYPE_DESC</option>
<option value="a.state ASC">JSTATUS_ASC</option>
<option value="a.state DESC">JSTATUS_DESC</option>
<option value="a.ordering ASC">JGRID_HEADING_ORDERING_ASC</option>
<option value="a.ordering DESC">JGRID_HEADING_ORDERING_DESC</option>
<option value="a.priority ASC">COM_SCHEDULER_TASK_PRIORITY_ASC</option>
<option value="a.priority DESC">COM_SCHEDULER_TASK_PRIORITY_DESC</option>
</field>
<field
name="limit"
type="limitbox"
label="JGLOBAL_LIST_LIMIT"
default="25"
onchange="this.form.submit();"
/>
</fields>
</form>
Loading