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
| Parameter | Type | Description | Validation Rules |
|---|---|---|---|
maintenance_mode_status | boolean | Enable/disable maintenance mode | Optional, true/false |
maintenance_mode_from | string | Start date and time of maintenance | Optional, format: Y-m-d H:i, must be after yesterday |
maintenance_mode_to | string | End date and time of maintenance | Optional, format: Y-m-d H:i, must be after maintenance_mode_from |
maintenance_mode_message | string | Message to display during maintenance | Optional, 3-255 characters |
terms_and_conditions_status | boolean | Enable/disable terms & conditions | Optional, true/false |
terms_and_conditions_date | string | Date and time of terms update | Optional, format: Y-m-d H:i |
terms_and_conditions_message | string | Terms & conditions message | Optional, 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.