Skip to content

Technical Plugin Scheduler

Daniel Neto edited this page Oct 29, 2026 · 1 revision

Technical: Scheduler plugin

Runs periodic plugin hooks, scheduled commands and configured watchdog tasks.

Audience: developers, advanced administrators and AI-assisted diagnosis. Plugin catalog.

Source baseline

  • Review date: 2026-10-29. Method: static source analysis; runtime/provider behavior was not exercised.
  • Code ownership: AVideo Streamer repository.
  • Reported version: 5.4.
  • Source revision: 7d48f2dfc0289236718a3f9fba7c5ffecff4a37f.
  • Entry class file: Scheduler.php.

Confirm the installed plugin version independently of the Streamer version. Configuration defaults below are not a dump of this installation's saved settings.

Behavior and operational checks

Enabling the plugin alone does not create an external timer. Inspect cron and job settings before running tasks manually because jobs can perform cleanup/watchdog operations. Encoder monitoring belongs to the separate Encoder installation.

Dependencies

No literal dependency declaration was extracted. This does not prove the plugin is standalone.

Literal runtime plugin references: CustomizeAdvanced, Live, YPTSocket. These calls do not mean every referenced plugin is mandatory.

Hook integration

Override Implementation
getPluginMenu() Scheduler.php:121
getManagerVideosAddNew() Scheduler.php:392
getManagerVideosEdit() Scheduler.php:399
getManagerVideosEditField($type = '<string>') Scheduler.php:406
saveVideosAddNew($post, $videos_id) Scheduler.php:452
afterNewVideo($videos_id) Scheduler.php:457
executeEveryMinute() Scheduler.php:584
executeEveryHour() Scheduler.php:606
executeEveryDay() Scheduler.php:619

Configuration assignments

These are direct assignments inside getEmptyDataObject(), not evaluated effective defaults. Stored plugins.object_data, globals, structured values and conditional branches may alter runtime behavior. Private/default credential values are omitted.

Field Literal default or expression type Literal source label/help Evidence
watchDogSocket true — source
watchDogLiveServer true — source
watchDogLiveServerSSL true — source
sendEmails true — source
deleteOldUselessVideos true — source
disableReleaseDate false Disable Release Date source
deleteOldOriginalFiles true Delete old original_v_* files source
originalFilesDaysToKeep 7 Days to keep original_v_* files (default: 7) source
objectCacheFilesDaysToKeep 3 Days to keep YPTObjectCache files (default: 3) source
objectCacheFilesMaxExecutionSeconds 60 Max seconds for hourly YPTObjectCache cleanup (default: 60) source

Files and request surface

This inventory distinguishes implementation files from an API specification. Includes, templates, callbacks and CLI workers are not interchangeable HTTP endpoints. Request-field names below are direct source references, not a complete schema or permission declaration.

File Source role Direct request fields observed
Objects/Email_to_user.php class/helper implementation —
Objects/Emails_messages.php class/helper implementation —
Objects/Scheduler_commands.php class/helper implementation —
Scheduler.php plugin entry class open, releaseDate, releaseDateTime, releaseTime, timezone
View/Email_to_user/add.json.php JSON entry point; inspect caller and guard emails_messages_id, id, sent_at, timezone, users_id
View/Email_to_user/delete.json.php JSON entry point; inspect caller and guard id
View/Email_to_user/index.php PHP page/include/worker; inspect caller —
View/Email_to_user/index_body.php PHP page/include/worker; inspect caller —
View/Email_to_user/index_head.php PHP page/include/worker; inspect caller —
View/Email_to_user/list.json.php JSON entry point; inspect caller and guard draw
View/Emails_messages/add.json.php JSON entry point; inspect caller and guard id, message, subject
View/Emails_messages/delete.json.php JSON entry point; inspect caller and guard id
View/Emails_messages/index.php PHP page/include/worker; inspect caller —
View/Emails_messages/index_body.php PHP page/include/worker; inspect caller —
View/Emails_messages/index_head.php PHP page/include/worker; inspect caller —
View/Emails_messages/list.json.php JSON entry point; inspect caller and guard draw
View/Scheduler_commands/add.json.php JSON entry point; inspect caller and guard callbackResponse, callbackURL, date_to_execute, executed_in, id, parameters, repeat_day_of_month, repeat_day_of_week, repeat_hour, repeat_minute, repeat_month, status, timezone, type
View/Scheduler_commands/delete.json.php JSON entry point; inspect caller and guard id
View/Scheduler_commands/index.php PHP page/include/worker; inspect caller —
View/Scheduler_commands/index_body.php PHP page/include/worker; inspect caller —
View/Scheduler_commands/index_head.php PHP page/include/worker; inspect caller —
View/Scheduler_commands/list.json.php JSON entry point; inspect caller and guard —
View/activeLabel.php PHP page/include/worker; inspect caller —
View/editor.php PHP page/include/worker; inspect caller —
downloadICS.php PHP page/include/worker; inspect caller date_end, date_start, description, joinURL, reminder, title
getManagerVideosAddNew.js browser/worker JavaScript; verify loader —
getManagerVideosEdit.js browser/worker JavaScript; verify loader —
install/install.sql schema/migration SQL —
install/updateV2.0.sql schema/migration SQL —
install/updateV3.0.sql schema/migration SQL —
install/updateV4.0.sql schema/migration SQL —
install/updateV4.2.sql schema/migration SQL —
install/updateV4.3.sql schema/migration SQL —
install/updateV4.4.sql schema/migration SQL —
install/updateV5.0.sql schema/migration SQL —
install/updateV5.1.sql schema/migration SQL —
managerVideosEdit.php PHP page/include/worker; inspect caller —
releaseVideoNow.json.php JSON entry point; inspect caller and guard videos_id
reminderOptions.php PHP page/include/worker; inspect caller —
run.php PHP page/include/worker; inspect caller —
sendEmail.json.php JSON entry point; inspect caller and guard scheduler_commands_id, token
watchDog.php PHP page/include/worker; inspect caller —

Data and migrations

Tables named in available CREATE TABLE statements: email_to_user, emails_messages, scheduler_commands. Apply installation/update behavior through the owning plugin; this reference is not a script for running historical migrations manually.

Main-file named symbols

Visibility and implementation semantics must be checked in source. Nonempty string defaults are represented as . This is a symbol reference, not a stable public API promise.

Function or method Source
getDescription() 14
getCronHelp() 29
getName() 38
getUUID() 43
getPluginVersion() 48
getEmptyDataObject() 53
sendEmails() 96
getPluginMenu() 121
run($scheduler_commands_id) 129
isActiveFromVideosId($videos_id) 195
addVideoToRelease($date_to_execute, $time_to_execute, $videos_id) 200
add($date_to_execute, $callbackURL, $parameters = ''<string>'') 234
addSendEmail($date_to_execute, $emailTo, $emailSubject, $emailEmailBody, $emailFrom = ''<string>''<string>'') 265
getReminderOptions( $destinationURL, $title, $date_start, $selectedEarlierOptions = array(), $date_end = ''<string>''<string>''<string>'10 minutes earlier'<string>'30 minutes earlier'<string>'1 hour earlier'<string>'2 hours earlier'<string>'1 day earlier'<string>'2 days earlier'<string>'1 week earlier' => 10080 ) ) 286
downloadICS($title, $date_start, $date_end = ''<string>''<string>''<string>'') 334
getManagerVideosAddNew() 392
getManagerVideosEdit() 399
getManagerVideosEditField($type = '<string>') 406
releaseVideosNow($videos_id) 415
convertIfTimezoneIsPassed($releaseDate) 441
saveVideosAddNew($post, $videos_id) 452
afterNewVideo($videos_id) 457
addNewVideoToRelease($videos_id, $releaseDate, $releaseDateTime = ''<string>'') 462
setReleaseDateTime($videos_id, $releaseDateTime, $releaseTime) 492
getReleaseDateTime($videos_id) 509
getLastVisitFile() 523
setLastVisit() 529
getLastVisit() 544
whyIsActive() 553
isActive() 571
executeEveryMinute() 584
executeEveryHour() 606
executeEveryDay() 619
fixCacheDirectoryPermissions($directory = '<string>', $maxEntries = 1000) 638
deleteOldObjectCacheFiles($days = 3, $directory = '', $maxExecutionSeconds = 60) 682
deleteOldFiles($directory = '<string>', $days = 7) 740
deleteOldOriginalFiles($days = null) 799
manageLogFile() 862

Supporting PHP declarations

These symbols are grouped by source file; inspect the class declaration and visibility before calling them.

Objects/Email_to_user.php

Declared classes: Email_to_user.

Named symbol Source
getSearchFieldsNames() 9
getTableName() 13
getAllEmails_messages() 17
setSent($email_to_user_id) 42
alreadyHasMessageSet($users_id, $emails_messages_id) 51
getAllToSend() 61
getAllEmailsToSend() 70
setId($id) 85
setSent_at($sent_at) 89
setTimezone($timezone) 93
setEmails_messages_id($emails_messages_id) 97
setUsers_id($users_id) 101
getId() 105
getSent_at() 109
getTimezone() 113
getEmails_messages_id() 117
getUsers_id() 121
save() 125

Objects/Emails_messages.php

Declared classes: Emails_messages.

Named symbol Source
getSearchFieldsNames() 9
getTableName() 13
setId($id) 17
setMessage($message) 21
setSubject($subject) 25
getId() 30
getMessage() 34
getSubject() 38
setOrCreate($message, $subject): Emails_messages 42

Objects/Scheduler_commands.php

Declared classes: Scheduler_commands.

Named symbol Source
getSearchFieldsNames() 17
getTableName() 21
isActiveFromVideosId($videos_id) 25
getFromVideosId($videos_id) 34
getTimesNow() 53
getAllScheduledTORepeat() 69
getAllActiveAndReady() 97
setId($id) 117
setCallbackURL($callbackURL) 121
setParameters($parameters) 125
setDate_to_execute($date_to_execute) 135
setExecuted_in($executed_in) 145
setStatus($status) 149
getId() 153
getCallbackURL() 157
getParameters() 161
getDate_to_execute() 165
getExecuted_in() 169
getStatus() 173
getCallbackResponse() 177
setCallbackResponse($callbackResponse) 181
setExecuted($callbackResponse) 185
getTimezone() 199
_setTimezone($timezone) 203
getVideos_id() 207
setVideos_id($videos_id): void 211
save() 216
getRepeat_minute() 256
getRepeat_hour() 260
getRepeat_day_of_month() 264
getRepeat_month() 268
setRepeat_minute($repeat_minute) 272
setRepeat_hour($repeat_hour) 276
setRepeat_day_of_month($repeat_day_of_month) 280
setRepeat_month($repeat_month) 284
getType() 288
setType($type) 292
getRepeat_day_of_week() 296
setRepeat_day_of_week($repeat_day_of_week) 300
deleteFromType($type) 304
getAllFromType($type) 315
getAllActiveOrToRepeat($type='') 335
getTime_to_execute() 363
setTime_to_execute($time_to_execute): void 367

run.php

Named symbol Source
_log($msg) 256

watchDog.php

Named symbol Source
secureAVideoFolder($folderPath = '<string>') 70

Diagnostics and validation

  1. Check the installed/enabled version and the dependencies/settings above.
  2. Identify the actual failing page, request, callback or worker and correlate its timestamp with the AVideo log.
  3. Follow the linked method and caller. Check business-state changes and output artifacts as well as HTTP status.
  4. Reproduce the relevant workflow in a test environment. External provider, Encoder, live-server, storage, payment and authenticated flows require their real integrations.

Shared diagnostic workflow. This page is not a security audit or a claim of end-to-end validation.

Clone this wiki locally