Spotify Scheduler
Automate and schedule your Spotify playback
Easily plan and schedule music for any time of day! Modify your schedule, choose a playlist from the user's playlist library, or directly add a playlist using its ID or link. Perfect for managing music playback effortlessly, whether you're creating a radio station for your school to play music during breaks or events, setting up a music schedule for your workplace, or planning playlists for specific times at venues.
In the Playlist tab, you can assign playlists to specific time slots. If no playlist is assigned to a slot, the default playlist will be used.
In the Recently played tab, you can see your playback history.
Set up Spotify App:
- Go to Spotify for Developers Dashboard and create a new app.
- Set the Redirect URI to:
http://localhost:23918
. - Select Web API
Download an .exe
file from the latest release here and launch it.
On the first run, you will be asked for CLIENT_ID and CLIENT_SECRET from Spotify. Then OAuth popup should open.
Clone the repository (by the command below, or download it)
git clone https://github.com/sandrzejewskipl/spotify-scheduler.git
Inside Spotify Scheduler's directory run this command:
chmod +x run.sh
Now, you can run this app by running:
./run.sh
This script will take care of making sure that Python3 and dependencies are installed.
On the first run, you will be asked for CLIENT_ID and CLIENT_SECRET from Spotify. Then OAuth popup should open.
Clone the repository (by the command below, or download it)
git clone https://github.com/sandrzejewskipl/spotify-scheduler.git
Install dependencies:
Make sure you have Python 3 installed. Then, download the required packages by running:
pip3 install -r requirements.txt
Make sure you have Python3-tk installed.
-
Linux:
sudo apt-get install python3-tk
-
MacOS:
brew install python-tk
Set up Spotify App:
- Go to Spotify for Developers Dashboard and create a new app.
- Set the Redirect URI to:
http://localhost:23918
. - Select Web API
Run this command from the command line in the same directory.
python3 spotifyscheduler.py
On the first run, you will be asked for CLIENT_ID and CLIENT_SECRET from Spotify. Then OAuth popup should open.
If you're running script manually on Windows and you're using cmd.exe (not Windows Terminal) remember to disable Quickedit to prevent program from freezing:
- Right-click the title bar of the Command Prompt window.
- Select “Properties” from the context menu.
- In the Properties window, click on the “Options” tab.
- Under the "Edit Options" section, uncheck the box that says "QuickEdit Mode." Click "OK" to save your changes.
- English (en)
- Polish (pl)
DEVICE NAME - name (or part of it) of the device in Spotify API that will play music. You can find the device name in the bottom-left corner or check the list of devices in the Settings tab. It defaults to host name.
Play music only on weekdays - Music will only be played from Monday to Friday. Default: Off
Killswitch - feature that kills the Spotify process(es) when an error with API occurs when pausing the playback. It prevents playing music out of schedule. Default: On
Auto-launch Spotify - feature that automatically launches Spotify if the device is not detected on the devices list. Default: On
For optimal stability and reliable playback automation, it's recommended to enable both the Killswitch and Auto-launch Spotify features.
After changing CLIENT_ID or CLIENT_SECRET or wanting to change Spotify account (do it by logging in to another account in the browser), click Delete cache (logout)
button.
App data files (config, schedules, playlists, logs and spotify token) are stored inside user's data directory:
Windows: %localappdata%\spotify-scheduler
Linux: ~/.local/share/spotify-scheduler
MacOS: ~/Library/Application Support/spotify-scheduler