You can do all sorts of Log copy trickery using Commands!
Sometimes you want to repeat complete Log hours in your schedule. Under normal circumstances, Myriad Schedule (or AutoTrack) will generate a new Log Hour for every hour of the week.
- Delete any existing Log from the target hour that you want to copy into.
- Copy a previous Log Hour to the gap you created in step 1.
You can expand this to have a single Command that could copy multiple Log Hours, to multiple destinations, but for now we will simply create a Command Media Item that will copy the content of the previous Log Hour paste it into the Log tomorrow evening.
The first step is to create a new Command Media Item to perform the task.
- Find an suitable and empty Media ID.
- Click on the Edit button on the Media Wall ribbon.
- Give it a suitable Title.
- Click on the Command option on the Editor tab.
- Expand the Command Examples tree node and select Log > Copy the previous hour to tomorrow option.
- This example includes the code needed to copy the previous Log Hour into the Log tomorrow, later in the day.
Let's take a closer look at that code:
REM First delete the destination hour to make sure it's empty
REM The first parameter being set to -1 means 'in the current open station'
REM Now copy from the previous hour (NowDayTNowHour-1) to tomorrow, 7 hours forward (NowDay+1TNowHour+7)
REM The first and third parameters being set to -1 means 'FROM the current open station, TO the current open station'
Any lines that start with REM are only there as documentation so the only active code in this Command are the two lines that start with Log.DeleteHour & Log.CopyHour.
First lets look at Log.DeleteHour. As you would expect, this Command is used to delete an hour from the Log
- This is the Station Database ID. -1 Means the Station that is open when the Command runs!
- NowDay allows a relative date to the current day when the Command runs. In this case NowDay+1 means tomorrow.
- After the 'T' is the section where you set the time. In this example it is NowHour (when Command is run) + 7 so if the Command runs at 1pm, this time would be 8pm! You can also specify an exact time like 20:00:00.
The Log.CopyHour Command is very similar.
- Database ID for hour to copy from. Again, -1 means current open Station DB.
- Set the Log Hour you want to copy. In this case the NowDayTNowHour-1 means the previous Log hour to the time/date when the Command is run.
- The next setting is for the Station Database ID you want to copy to. In this example, -1 means the current open Station.
- Set the target date / time to copy the hour to. In this example we are using NowDay+1 (tomorrow)TNowHour+7 (whatever the current hour plus seven). So if we ran this today at 1pm it would copy the Log Hour to 8pm tomorrow. As before, a specific date and time can be used.
- ResetAdvert Breaks - True / False. If set to True then advert breaks will be removed as part of copy.
As you can see, you can create Commands to copy hours relative to when the Commands are run or with very specific dates and times built into the Commands.
Remember that you can also have multiple 'lines' in Commands that will be executed in sequence so you could create a single Command Media Item that you run once a day that copies all the desired Log Hours into your future schedule.
You can learn more about Commands and what the attributes mean by clicking on the Display Available Commands button at the bottom of the Commands window.
Caution - Triggering Commands
Now that you have a Command that copies the previous hour in the Log to tomorrow (7 hours ahead) you can simply schedule it to to be included in the Log hour after the one you want to copy.
Caution - Why not put in the end of the Log Hour being copied? Well if think about it, the complete Log Hour would be copied to tomorrow including the Command to copy the Hour so you would end up with a cycle of the same hour being copied across your schedule. By running the Command in the following Hour you can avoid this.
Other Options - This works ok as long as you don't need to copy any of the Hours that include this Command. In practice you may be better creating a Media Command (or several) that do all the copying you need, that can be ran once a day in an hour that is not being copied. Commands also act like any other Media Item which means you can trigger them by double clicking them on the MediaWall, add them to Favourites or even drag them into the Log.
Commands are a very powerful tool that can be used for a wide range of applications. It is well worth taking the time to explore the Command documentation to see what is possible.