# 1.8 Alpha CMS - Cannot schedule a command

**URL:** https://community.xibo.org.uk/t/1-8-alpha-cms-cannot-schedule-a-command/4179
**Category:** Developer Experience
**Created:** [November 22, 2015, 8:34am UTC](https://community.xibo.org.uk/t/1-8-alpha-cms-cannot-schedule-a-command/4179 "2015-11-22T08:34:57Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![cslaughter](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/cslaughter/32/186_2.png) [@cslaughter](https://community.xibo.org.uk/u/cslaughter)
#### Post date: [November 22, 2015, 8:34am UTC](https://community.xibo.org.uk/t/1-8-alpha-cms-cannot-schedule-a-command/4179/1 "2015-11-22T08:34:57Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [November 23, 2015, 4:59pm UTC](https://community.xibo.org.uk/t/1-8-alpha-cms-cannot-schedule-a-command/4179/2 "2015-11-23T16:59:41Z")

</div>

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 😉

---

<div class="post-metadata">

### Author: ![cslaughter](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/cslaughter/32/186_2.png) [@cslaughter](https://community.xibo.org.uk/u/cslaughter)
#### Post date: [November 23, 2015, 6:58pm UTC](https://community.xibo.org.uk/t/1-8-alpha-cms-cannot-schedule-a-command/4179/3 "2015-11-23T18:58:32Z")

</div>

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

 ![](https://community.xibo.org.uk/uploads/default/original/1X/4de4e49b1655bf81ce4da656256331984f7a88cf.png)

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.

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [November 24, 2015, 8:15am UTC](https://community.xibo.org.uk/t/1-8-alpha-cms-cannot-schedule-a-command/4179/4 "2015-11-24T08:15:37Z")

</div>

I’m pretty sure the API doc is there in `swagger.json` - [https://github.com/xibosignage/xibo-cms/blob/develop/web/swagger.json#L2239](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:

> <https://github.com/xibosignage/xibo-cms/blob/develop/lib/Entity/Schedule.php#L260>

It appears that changing that line to:

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

```

Will solve the issue.

---

<div class="post-metadata">

### Author: ![cslaughter](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/cslaughter/32/186_2.png) [@cslaughter](https://community.xibo.org.uk/u/cslaughter)
#### Post date: [December 14, 2015, 6:27am UTC](https://community.xibo.org.uk/t/1-8-alpha-cms-cannot-schedule-a-command/4179/5 "2015-12-14T06:27:08Z")

</div>

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

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [December 14, 2015, 10:03am UTC](https://community.xibo.org.uk/t/1-8-alpha-cms-cannot-schedule-a-command/4179/6 "2015-12-14T10:03:10Z")

</div>


