Accesso rapido:  

Forum: VirtualDJ Technical Support

Topic: Event Scheduler - To play a different playlist on specific dates
Sorry if the title is a little strange. But currently i have VDJ event scheduler playing like a randomised playlist of songs which plays as soon as the computer is turned on. But i was wondering if there was a way to program the scheduler to check the day or date first and then play a different playlist instead. Ie like Monday - Thursday it plays playlist X and on Fri-Sun plays Y. Or that on the 01/01/23 it plays a different playlist just for that day.... so that i could plan to have that playlist set a few days in advance and not have to manually adjust it on the day.

Thanks guys,
 

Inviato Thu 11 May 23 @ 1:06 pm
locoDogPRO InfinityModeratorMember since 2013
I had to remind myself how to do it.
This will give you a number between 0 & 6, zero = sunday [I think]

set day `countdown '2023/01/01 00:00' '%DD' & param_cast 'int_trunc' & param_mod 7`
 

Inviato Thu 11 May 23 @ 1:49 pm
One way to approach this is to use vbscript at system startup.

This assumes you have a playlist for each day of the week in C:\Playlists and that the playlist you're playing from VDJ is "today.m3u". You can obviously modify those values in the code. Set the vbscript to run at startup before VDJ and you should be set.

'Set up a few variables
Dim playlist
Dim objShell
Dim strPath
Dim FSO

'Select which playlist to use by the day of the week
select case Weekday()
case 1
playlist="Sunday.m3u"
case 2
playlist="Monday.m3u"
case 3
playlist="Tuesday.m3u"
case 4
playlist="Wednesday.m3u"
case 5
playlist="Thursday.m3u"
case 6
playlist="Friday.m3u"
case 7
playlist="Saturday.m3u"
end select

'Get the Documents path for VDJ
Set objShell = Wscript.CreateObject("Wscript.Shell")
strMyPath = objShell.SpecialFolders("MyDocuments")

'Copy the file
Set FSO = CreateObject("Scripting.FileSystemObject")
FSO.CopyFile "C:\Playlists\" + playlist, strMyPath+"\Virtual DJ\Playlists\today.m3u", true


 

Inviato Fri 12 May 23 @ 4:51 pm