WAREST icon

WAREST

Interact with the WARest WhatsApp REST API

Overview

This node operation schedules a daily restart for a server using the WARest WhatsApp REST API. It allows users to specify a daily time for the restart or cancel a previously scheduled restart by setting the schedule to '0'. Additional optional fields include a reason for the restart, a delay in milliseconds before the restart occurs, and a timezone to correctly interpret the scheduled time. This operation is useful for automating server maintenance tasks to ensure the server restarts at a consistent time each day, which can help in applying updates or clearing temporary issues without manual intervention.

Use Case Examples

  1. Schedule a server to restart daily at 03:00 AM to apply updates automatically.
  2. Cancel a previously scheduled daily restart by setting the schedule to '0'.
  3. Schedule a daily restart at 02:30 AM with a 5-minute delay and specify the timezone as 'Asia/Jakarta'.

Properties

Name Meaning
Schedule (HH:MM or 0 to cancel) The time of day to schedule the server restart in 24-hour format (HH:MM). Setting this to '0' cancels any scheduled restart.
Reason Optional reason for scheduling the restart, useful for logging or notification purposes.
Delay (ms) Optional delay in milliseconds before the restart is executed after the scheduled time.
Timezone Optional IANA timezone string (e.g., Asia/Jakarta) to interpret the scheduled time correctly according to the server's timezone.

Output

JSON

  • json - Response from the WARest API indicating the status of the scheduled restart operation

Dependencies

  • Requires an API key credential for the WARest WhatsApp REST API and the base URL of the API server.

Troubleshooting

  • Ensure the 'schedule' property is in the correct HH:MM format or set to '0' to cancel. Invalid formats may cause errors.
  • If the server does not restart as scheduled, verify the timezone setting matches the server's timezone.
  • Check API credentials and base URL configuration if the node fails to connect to the WARest API.
  • Common error messages may include invalid schedule format, unauthorized access due to incorrect API key, or server communication errors. Verify all inputs and credentials are correct.

Links

Discussion