Create

Create a new recording schedule

This action requires a request with an active account.

Tokens

This action requires the following tokens:

  • recordschedule-write

Arguments

Required arguments are marked in bold, and optional arguments are marked in italics.

Argument Type Default Description
name String   Name of this record schedule
source URL   Source live stream URL for this recording schedule. Either this or livestream should be set
sourceproxy URL   Source proxy for this recording schedule; used when connecting to source
livestream Hash   If given, hash of the livestream to record
title String  

Title used for the items that are created after each recording. Can use the following characters which will automatically be replaced:

  • %a: abbreviated textual representation of the day (e.g. Mon, Tue, etc.)
  • %A: full textual representation of the day (e.g. Monday, Tuesday, etc.)
  • %d, %e: day of the month with (%d) and without (%e) leading zero.
  • %b: abbreviated textual representation of the month (e.g. Jan, Feb, etc.)
  • %B: full textual representation of the month (e.g. January, February, etc.)
  • %m: month as integer, with leading zero
  • %y, %Y: year with two (%y) or four (%Y) digits
  • %H, %k: hour with (%H) or without (%k) leading zero in numeric format; 24-hour
  • %I, %l: hour with (%I) or without (%l) leading zero in numeric format; 12-hour
  • %M: minutes as integer, with leading zero
  • %p, %P: upper- (%p) or lower- (%P) -case AM / PM
  • %S: seconds as integer, with leading zero
  • %%: a literal %

If no title is given, the following will be taken, in order, if available:

  • livestream-name (%d-%m-%Y %H:%M:%S)
  • livestream-hash (%d-%m-%Y %H:%M:%S)
  • Live recording (%d-%m-%Y %H:%M:%S)

(note the last option has the hard-coded text ‘Live recording’)

If a live recording is interrupted while recording, every item except for the first one will have ‘ (#)’ behind its title, where # is the index of the recording, starting with 2.

description String   Description for items that are created after recording
author String   Author for tems that are created after recording
copyright String   Copyright for tems that are created after recording
keywords String   Keywords for tems that are created after recording; separate by a comma
categories String   Categories for newly created items. Hashes separated by comma
active Boolean true Whether the schedule should be active
startdate DateTime   Date and time to start the recording. If the start date has already passed or is within a short time of now, the recording will be started as soon as possible, but it can still take up to 15 minutes before the recording starts.
duration Duration   Duration of each item in this schedule. I.e. every item will be recorded from date until date + duration, where date is the next date in this schedule.
protected Boolean   Whether items created with this schedule will be protected. If not set will default to the value of the livestream or false if no livestream provided
rrule String   iCal RRULE for repeating recordings. Format follows RRULE definition as specified by RFC 5545. See http://tools.ietf.org/html/rfc5545 (chapter 3.3.10 and 3.8.5.3) for format and examples. “RRULE:” should not be provided. If this argument is given, the other arguments relating to the schedule (all arguments below) will be ignored
frequency String  

Frequency used for this repeating recording. Either this or rrule must be set.

This argument can only contain one of the following values:

  • minutely
  • hourly
  • daily
  • weekly
  • monthly
  • yearly
count Integer   Maximum number of times the schedule is repeated
until DateTime   Date and time until when this schedule is repeated
interval Integer 1 Interval between two occurrences. For example, within a DAILY rule, a value of “8” means every eight days, even if for example byhour contains more than one value.
bysecond String   Repeat on the given seconds. Comma-separated list of integers between 0 and 59. If not given, will repeat only on the second given by startdate. Note this will currently only work with daily or higher rules
byminute String   Repeat on the given minutes. Comma-separated list of integers between 0 and 59. If not given, will repeat only on the minute given by startdate. Note this will currently only work with daily or higher rules
byhour String   Repeat on the given hours. Comma-separated list of integers between 0 and 23. If not given, will repeat only on the hour given by startdate. Note this will currently only work with daily or higher rules
byday String   Repeat on the given weekdays. Comma-separated list of values in the set mo, tu, we, th, fr, sa, and su
bymonthday String   Repeat on the days of the month. Comma-separated list of integers between 10 and 31
byyearday String   Repeat on the given days of the year. Comma-separated list of integers between 1 and 366
byweekno String   Repeat on the given weeks of the year. Comma-separated list of integers between 1 and 53
bymonth String   Repeat on the given months. Comma-separated list of integers between 1 and 12
bysetpos String   Only use the given results from the occurrence set. Comma-separated list of integers between 0 and 366. Note this is currently only supported for monthly rules

Output

This action produces the following output on success:

An object containing the following fields:

Name Type Description
id Hash Hash of this schedule
name String Name of this schedule
user

User who created this record schedule

The value of this field is an object containing the following fields:

Name Type Description
id Hash User ID
username String User name
account

Account of this schedule

The value of this field is an object containing the following fields:

Name Type Description
id Hash Account ID
name String Account name
source String The source of this record schedule
sourceproxy String The proxy for the source
livestream

The live stream of this record schedule

The value of this field is an object containing the following fields:

Name Type Description
id Hash Livestream ID
title String Title of the live stream
description String Description of the live stream
type Label The type of this livestream; for available livestream types, refer to the documentation of the Livestream command
title String Title for created items
description String Description for created items
author String Author for created items
copyright String Copyright for created items
keywords

Keywords for created items

The value of this field is an array containing zero or more elements, each one being one String: One keyword

categories

Categories for created items

The value of this field is an array containing zero or more elements, each one being an object containing the following fields:

Name Type Description
id Hash Category ID
name String The name of this category
protected Boolean Whether items created with this schedule will be protected
active Boolean Whether this schedule is active
startdate DateTime Start date and time for this schedule
duration Duration Duration for this schedule
datecreated DateTime When this schedule was created
datemodified DateTime When this schedule was last modified
nextstart DateTime The next time this schedule will record
laststart DateTime The last time this schedule was started
repeatschedule

Information about how this schedule will repeat

The value of this field is an object containing the following fields:

Name Type Description
frequency String The frequency of this schedule
count Integer How many times this schedule will repeat
until DateTime Until when this schedule will repeat
interval Integer The interval of this schedule
bysecond

On which seconds this schedule will repeat

The value of this field is an array containing zero or more elements, each one being one Integer: A second on which this schedule will repeat

byminute

On which minutes this schedule will repeat

The value of this field is an array containing zero or more elements, each one being one Integer: A minute on which this schedule will repeat

byhour

On which hours this schedule will repeat

The value of this field is an array containing zero or more elements, each one being one Integer: An hour on which this schedule will repeat

byday

On which days of the week this schedule will repeat

The value of this field is an array containing zero or more elements, each one being one String: A day of the week on which this schedule will repeat

bymonthday

On which days of the month this schedule will repeat

The value of this field is an array containing zero or more elements, each one being one Integer: A day of the month on which this schedule will repeat

byyearday

On which day of the year this schedule will repeat

The value of this field is an array containing zero or more elements, each one being one Integer: A day of the year on which this schedule will repeat

byweekno

On which weeks of the year this schedule will repeat

The value of this field is an array containing zero or more elements, each one being one Integer: A week of the year on which this schedule will repeat

bymonth

On which months this schedule will repeat

The value of this field is an array containing zero or more elements, each one being one Integer: A month on which this schedule will repeat

bysetpos

On which occurrences in the result set this schedule will repeat

The value of this field is an array containing zero or more elements, each one being one Integer: A occurrence in the result set on which this schedule will repeat

Errors

This action will always return one of the default status codes.