Difference between revisions of "Plugin:AutoDJ:Scheduler"

From ShoutIRC RadioBot Wiki
Jump to navigation Jump to search
Line 76: Line 76:
  Artist - Match song Artist
  Artist - Match song Artist
  Album - Match song Album
  Album - Match song Album
Year - (filters only) Year or MinYear:MaxYear


  If there are multiple matches, it will choose them randomly up to the maximum results
  If there are multiple matches, it will choose them randomly up to the maximum results

Revision as of 04:01, 12 August 2015

AutoDJ Scheduler

This is a feature of AutoDJ.

Configuration

All your scheduled items (or Timers) are stored in schedule.conf. The lines are formatted like so:

EntryType mode months days hours minute extra pattern_type pattern
# Song is requested every Mon, Wed, Fri at 1 pm
Timer req Z MWF 13 0 0 filename telepopmusik - breathe.mp3
# Song is requested every weekday at 6:30 pm and 9:30 pm
Timer req Z E 18,21 30 0 filename *internet*relation*
# Script is executed every weekday at 3:00 pm
Timer script Z E 15 0 0 filename script.txt

Configuration Codes

Entry Types:

Only Timer is currently supported

Mode Types:

req - Add Song to Request List
override - Play song at this time, halting any other song
filter - Plays only songs matching the filter for (extra) number of seconds
relay - Play the song or URL at this time. This is just like !relay in that you can use full filenames and they files don't have to be in the AutoDJ content folder. (use filename pattern_type)
script - Execute the script specified by pattern. (use filename pattern_type, no variables/wildcards supported)
 Note: To use scripts you must first create an AutoDJ user in RadioBot with the following PM command: !adduser AutoDJ +flags random_password [email protected]
 Note2: You can change random_password to whatever you want, and use whatever flags you want to restrict which commands the scripts can run.

Month Codes:

Z = All
J = January
F = Februay
M = March
A = April
Y = May
U = June
L = July
G = August
S = September
O = October
N = November
D = December
You can combine these, ie YULG to cover the summer.

Day Codes:

Z = All Days
S = Sunday
M = Monday
T = Tuesday
W = Wednesday
H = Thursday
F = Friday
A = Saturday
E = Weekdays (M-F)
K = Weekends (Sat & Sun)
You can combine these, ie MWF or M,W,F for Monday, Wednesday, and Friday.

Hours:

0-23 (military time)
Can be 0,12,16 for multiple hours

Minutes:

0-59
Only one minute is currently allowed

Extra:

Req/Override - Set to the maximum number of files to queue if there are multiple matches of the pattern. 0 is unlimited.
Filter - Number of seconds filter should remain active for

Pattern Type:

Filename - Match song filename
Directory - Match the directory a song is in
Genre - Match song Genre
Artist - Match song Artist
Album - Match song Album
Year - (filters only) Year or MinYear:MaxYear
If there are multiple matches, it will choose them randomly up to the maximum results

Variables

Variables will include:

%yy = year (2-digits)
%yyyy = year (4-digits)
%m  = month (1-12)
%mm = month (01-12, with leading zero)
%d  = day of month (1-31)
%dd = day of month (01-31, with leading zero)
%w  = day of week (0-6)
%ww = day of week (00-06, with leading zero)
%h  = hours (0-23)
%hh = hours (00-23, with leading zero)
%n  = minutes (0-59)
%nn = minutes (00-59, with leading zero)
%s  = seconds (0-59)
%ss = seconds (00-59, with leading zero)

Previous Weekdays

To set the last weekday # you want, put %lw(X) before your other %lw variables.
Example: %lw(0)%lwmm-%lwyyyy would be today if it is a weekday, or last Friday for Sat/Sun.
Example: %lw(1)%lwmm-%lwyyyy would be yesterday if it is Tues-Fri, or last Thursday for Sat/Sun/Mon.


RadioBot vde

RadioBot main pages
Main PageInstallationChangelogCommandsPluginsFAQConfigurationCreditsRemote ClientBuilt-In VariablesMulti Sound Server ModeUsername Character Restrictions
Auto DJ Pages
Auto DJ Main PageWebRequest SystemSchedulerMP3 EncoderVoice SupportMySQL Plugin