Using the Scheduler extension for WS.WebTV
support, ws.webtv, home, contents, scheduler, tasks
This extension allows you to schedule tasks to automate various WebTV actions. You can create tasks for Categories, Channels, Clips/Ads, Menus, Users and Widgets.
In this tutorial we explain how to use the Scheduler, through an example.
Important:
Before creating Tasks make sure you have correctly set the Time Zone, according to your geographical location, in Configuration > General > Regional Settings.
1. Go to the Scheduler page...
(A) To create a new Task, click on "New Task..." button and select the type of Task you want to create. Select "Channel".
(B) To edit an existing Task click the corresponding "pencil" icon.
The creation and edition interfaces are very similar, however, when you are editing a Task you will see additional options.
2. The creation page...
Title: Enter a title for the Task.
Description: For your reference only.
Channel: This option changes according to the Task type (Clip, Category, etc.). Make your choice.
Action & Condition: Here you specify the action the Task will execute and the condition that will trigger it.
Action: Select the action to be executed.
Available actions
• General (triggered by date): Activate, Deactivate, Delete.
• Clip/Ad specific (triggered by condition): Deactivate after "n" playbacks, Deactivate after "n" complete playbacks, Deactivate after "n" clicks (Ads only).
• Channel specific: (see "Integration", bellow) Select current Playlist by date, Select current Playlist by day of the week. These actions are great to create a Channel programming, with a different playlist for every day of the week.
• User specific (triggered by date): Change access level, Allow User access to Channel, Allow User access to Clip, Disallow User access to Channel, Disallow User access to Clip.
Condition
When the action is triggered by date, you will see the date field/calendar icon (date selection popup will open when clicking any of these) and the Hour fields (24hr. format).
When the action is triggered by day of the Week (for example, when creating a playlist selection Task - by day of the week - for a Channel), you will see the day selection checkboxes and the Hour fields (24hr. format) - see "Cron job" section at the end of this document:
When the action is triggered by another condition (for example, when creating a Clip deactivation Task - after "n" playbacks-), you will see the trigger value field instead:
NOTE: All Task are executed as soon as possible. With every WebTV page load the Scheduler checks the pending tasks and execute those who meet the condition; however, because of this, it is very likely that many time conditioned Tasks are executed after the trigger date/time (if the WebTV does not receive any visit, then no Task will be executed). This should not be a problem because, in any case, the actions of the Tasks conditioned by time will be execute before presenting the content to the User.
Repeat: Select whether you want the Task to repeat or not. This is to execute the Task again after a specified time.
If select Yes, the "Repeat after" option will appear.
NOTE: This option is not available on Tasks with a Delete action.
Auto-Delete: Select whether you want the Task to be automatically deleted after execution, otherwise, the Task will be kept with "inactive" (and "executed") status.
NOTE: All Tasks with a Delete action will auto-delete automatically when executed
3. Done editing...
Once you are done editing the Task, click the Save button.
The Scheduler also integrates with Video Channels, Clips and Users edit pages.
Video Channel Edit Integration
You can manage Video Channel Tasks from the Channel itself. Furthermore, Tasks with action "Select current Playlist..." must be created here.
Clip Edit Integration
You can manage Clip Tasks from the Clip itself.
User Edit Integration
You can manage User Tasks from the User itself.
NOTE: The options "User » Channel" and "User » Clip" are only available with the Advanced User Management extension.
In order to guarantee the execution of tasks which are scheduled (and repeat) a specific day of the week, you must create a "cron job" in your server so that it "visits" the WebTV URL or, in the case of WS.WebTV 2.0, so that it visits the script <webtv_url>/cron.php, on a daily basis (or better yet, every hour or, if possible, every 30 or 15 minutes). The cron must be created using a lynx, wget or curl command.
Cron command example (WS.WebTV 2+):
curl --silent --user-agent Server-Cron "http://WEBTV_URL/cron.php" >/dev/null 2>&1
Cron command example (WS.WebTV 1.9 and previous):
curl --silent --user-agent Server-Cron "http://WEBTV_URL" >/dev/null 2>&1