Skip to main content

Scheduler Tasks

This section covers the API endpoints for managing scheduler tasks in the admin panel, including maintenance mode and terms & conditions settings.

List Scheduler Tasks

GET /v1/admin/scheduler-tasks

Returns the current maintenance mode and terms & conditions settings.

Response

{
"success": true,
"message": "تم تحديث البيانات بنجاح.",
"data": {
"maintenance_mode_status": "false",
"maintenance_mode_from": "2025-03-20 16:49",
"maintenance_mode_to": "2025-03-21 16:49",
"maintenance_mode_message": "الموقع حالياً في وضع الصيانة .. سيعود للعمل بعد نصف ساعة",
"terms_and_conditions_date": "2023-03-16 09:45",
"terms_and_conditions_message": "عزيزي المتدرب ، تم تحديث الشروط والأحكام - فضلاً مراجعتها والموافقة لإكمال تسجيل دخولك.",
"terms_and_conditions_status": false
},
"status_code": 200
}

Update Scheduler Tasks

PATCH /v1/admin/scheduler-tasks

Update maintenance mode and terms & conditions settings.

Request Body

ParameterTypeDescriptionValidation Rules
maintenance_mode_statusbooleanEnable/disable maintenance modeOptional, true/false
maintenance_mode_fromstringStart date and time of maintenanceOptional, format: Y-m-d H:i, must be after yesterday
maintenance_mode_tostringEnd date and time of maintenanceOptional, format: Y-m-d H:i, must be after maintenance_mode_from
maintenance_mode_messagestringMessage to display during maintenanceOptional, 3-255 characters
terms_and_conditions_statusbooleanEnable/disable terms & conditionsOptional, true/false
terms_and_conditions_datestringDate and time of terms updateOptional, format: Y-m-d H:i
terms_and_conditions_messagestringTerms & conditions messageOptional, 3-255 characters

Response

{
"success": true,
"message": "تم تحديث البيانات بنجاح.",
"data": {
"maintenance_mode_status": false,
"maintenance_mode_from": "2026-01-30 14:07",
"maintenance_mode_to": "2026-02-01 10:05",
"maintenance_mode_message": "الموقع حالياً في وضع الصيانة .. سيعود للعمل بعد نصف",
"terms_and_conditions_status": true,
"terms_and_conditions_date": "2026-01-30 11:03",
"terms_and_conditions_message": "fgdfgd"
},
"status_code": 200
}

Authorization

All scheduler tasks endpoints require admin authorization. The user must have the appropriate permissions to view and update these settings.