Commit Graph

8 Commits (04ca20e9f1999d2c780043152cf233bcb1836d18)

Author SHA1 Message Date
OpenGnSys Support Team 04ca20e9f1 #971 split into smaller file
Split ogAdmServer into several files:

* sources/rest.c that implements the server REST API.
* sources/client.c that implements the client REST API.
* sources/json.c that provides a few JSON helpers.
2020-06-18 18:46:48 +02:00
Javier Sánchez Parra a63ec0ba7f #942 Fix immediate procedures
New versions of ogAdmServer handle pending commands in a different way.
Instant procedures uses the old way, now unsupported, so we need to
adapt instant procedures.

This commit adapts instant procedures to work with the new pending
commands implementation.
2020-06-02 12:32:36 +02:00
OpenGnSys Support Team 6c7d827904 #942 ignore stale schedules on start 2020-06-02 12:32:36 +02:00
OpenGnSys Support Team 894d8332f4 #942 add command type to POST /schedule/create
Pass idcomando as task_id.
2020-06-02 12:32:36 +02:00
OpenGnSys Support Team 63c4ea5e12 #942 add enum og_schedule_type 2020-06-02 12:32:36 +02:00
Javier Sánchez Parra 85b345db77 #942 Add tasks to queue 2020-06-02 12:32:36 +02:00
Javier Sánchez Parra 130b6ffae8 #942 Add weeks and week days to the schedule API
* add og_schedule_create_weekdays()
* add og_schedule_create_weeks()
* add og_schedule_create_days()
2020-06-02 12:32:36 +02:00
OpenGnSys Support Team 83b242ce58 #942 Add support for scheduled tasks and commands
This field needs to be at least 31 bits long to store all days in a month.
Other fields are also set to 32 bits because unsigned int length can change
depending on the system.

We also need to support the three ways that the ogAdmAgent and the WebConsole
have to create an schedule. At first, we only supported the easiest
method:
	* Hour, day, month and year -> 10:00, 28, february, 2020

This commit adds these two ways to create an schedule:
	* Hour, week day, month and year -> 10:00, Monday, february,
	  2020
	* Hour, week, month and year -> 10:00, first week, february,
	  2020
2020-06-02 12:32:36 +02:00