1.8 Alpha CMS - Cannot schedule a command

While trying to schedule an event, we get an error.

We have “Even Type” set to “Command” and “Command” is set to a command from the drop down list.

Upon trying to save, you get “Please select a command for this Event.”

We would love to know how to do this via the API. Sure could be useful.

Sorry to ask for clarification - you can’t do this from the API or you can’t do this from the UI ? Do you have some logs I can look at?

The API docs should have been updated with the new parameters for schedule add/edit - the principle going forwards is that anything added to the UI will also be in the API at the same time :wink:

Dan, sorry about not being more clear. The problem is within the CMS.

Log:

22746	f2a3029	2015-11-23 10:53	WEB	POST	DEBUG		/schedule	Storage rollback.
22745	f2a3029	2015-11-23 10:53	WEB	POST	DEBUG		/schedule	Please select a Command for this event.
22744	f2a3029	2015-11-23 10:53	WEB	POST	DEBUG		/schedule	Times received are: FromDt=2015-11-23 11:00:43. ToDt=2015-11-23 11:01:00. recurrenceRange=2015-11-23 10:53:25
22743	f2a3029	2015-11-23 10:53	WEB	POST	DEBUG		/schedule	Add Schedule
22742	f2a3029	2015-11-23 10:53	WEB	POST	DEBUG		/schedule	Loading 1. All Objects = 0

Once we saw that this is being built into the CMS, we immediately decided it would be handy for us to also schedule a reboot via the API. So that is why I commented about being able to do this via the API. We will look through the latest API documentation, it sounds like it should be in there.

I’m pretty sure the API doc is there in swagger.json - https://github.com/xibosignage/xibo-cms/blob/develop/web/swagger.json#L2239

The error on the form doesn’t make much sense to me as the validation library is validating that command like so:

It appears that changing that line to:

if (!v::int()->notEmpty()->validate($this->commandId)) {

Will solve the issue.

This is fixed and can be closed. Sorry for the late reply.

1 Like