Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →You can schedule recurring YouTube playlist rotations with a GitHub Actions workflow that runs on a cron schedule, reads the playlist, and reconciles it against a list of video IDs stored in your repository. Use YouTube Data API OAuth credentials for changes, because an API key alone cannot authorize playlist writes. Include a manual run option: GitHub schedule events are best-effort, so a run can be delayed or dropped.
How the rotation works
A GitHub Actions schedule starts a workflow; it does not edit a playlist by itself. Your workflow needs to authenticate to the YouTube Data API, read the current playlist entries, compare them with your desired rotation, then insert, update, or delete entries as needed.
Keep the target playlist ID, ordered video IDs, and retention policy in version-controlled configuration. Treat that configuration as the desired state, and make each run safe to repeat: it should converge on the same playlist rather than blindly append duplicates or delete entries based on an outdated assumption.
Set up the scheduled workflow
Choose a cadence and timezone
GitHub Actions uses POSIX cron syntax for scheduled workflows. The shortest supported interval is every five minutes, although playlist rotations usually need a much less frequent cadence. Schedules use UTC unless you specify an IANA timezone, and they run against the latest commit on the repository’s default branch. The workflow file and configuration changes therefore need to be merged into that branch before scheduled runs use them. See GitHub’s schedule event documentation and workflow syntax reference.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
- UTC: Leave the timezone unspecified and write the cron expression in UTC for a fixed UTC cadence.
- Local wall-clock time: Set an IANA timezone. During a spring-forward skipped hour, GitHub advances the run to the next valid time, so local-time schedules can shift around daylight-saving transitions.
- Run away from the top of the hour: This may reduce exposure to busy periods, but does not guarantee exact timing.
For example, 17 6 * * * requests a daily run at 06:17 UTC. GitHub documents that schedule events can be delayed during periods of high workflow load, particularly around the start of an hour, and queued runs can be dropped. For public repositories, scheduled workflows are automatically disabled after 60 days without repository activity. Design for retries and missed runs rather than relying on minute-exact delivery. See GitHub’s scheduling guidance.
Add schedule and manual triggers
Create a workflow file under .github/workflows/. The following is a structural example; replace the placeholder cron value and rotation command with your actual schedule and implementation:
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
name: Rotate YouTube playlist
on:
schedule:
- cron: '17 6 * * *'
workflow_dispatch:
permissions:
contents: read
jobs:
rotate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Reconcile playlist
env:
YOUTUBE_OAUTH_CLIENT_ID: ${{ secrets.YOUTUBE_OAUTH_CLIENT_ID }}
YOUTUBE_OAUTH_CLIENT_SECRET: ${{ secrets.YOUTUBE_OAUTH_CLIENT_SECRET }}
YOUTUBE_REFRESH_TOKEN: ${{ secrets.YOUTUBE_REFRESH_TOKEN }}
run: python scripts/rotate_playlist.py
The example shows the trigger and secret-injection pattern, not a complete OAuth implementation or a ready-to-run rotation script. The workflow runs with the default branch’s latest commit. Add workflow_dispatch so an authorized maintainer can test or recover a run manually from the repository’s Actions interface.
Authorize playlist changes securely
YouTube playlist insert, update, and delete operations require OAuth authorization. The supported scopes listed for insert and delete include https://www.googleapis.com/auth/youtube and https://www.googleapis.com/auth/youtube.force-ssl. An API key is not sufficient to make playlist changes. Consult the YouTube API authentication guide, insert reference, and delete reference.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchPC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
- Create and configure an OAuth client using Google’s developer tooling for the channel owner, then establish an appropriate token and refresh strategy for unattended runs. The API references establish that OAuth is required and list supported scopes; they do not guarantee a refresh token will be issued automatically or remove the need to configure consent and credentials.
- Store the OAuth values as GitHub Actions secrets. Map them into only the step that needs them, as in the example, and never print credentials, tokens, or transformed versions of them in logs.
- Keep the workflow’s
GITHUB_TOKENpermissions at the narrowest practical level. GitHub recommends read-only defaults where feasible; that repository token is separate from the YouTube OAuth credential. - Choose repository secrets for a straightforward setup, or environment secrets if you need environment scoping and required reviewer approvals. GitHub documents both approaches in its secrets guidance and secure-use guidance.
Reconcile the playlist without duplicates
A YouTube playlist entry is a playlistItem. Each entry has its own id, while the underlying video’s ID appears at snippet.resourceId.videoId. Use the playlist-item ID to delete an entry; do not pass the video ID to the delete method. See Google’s playlistItems resource reference.
- Read the current entries. Call
playlistItems.listfor the target playlist and retain both the playlist-item ID and video ID for each result. Handle pagination if the playlist may exceed a single response. - Calculate desired state. Apply your configured order and retention policy to the video IDs. Decide explicitly whether the rotation means keeping a fixed ordered set, retaining the newest N items, or replacing entries on a cadence; the API provides operations, not the policy.
- Insert missing videos. Use
playlistItems.insertwithsnippet.playlistIdandsnippet.resourceId. Avoid inserting a video already present unless the intended policy explicitly allows a duplicate. - Remove unwanted entries. Reconfirm the playlist state before destructive operations, then call
playlistItems.deletewith the corresponding playlist-itemid. - Set order when needed. Use
playlistItems.updateto change an entry’s position; insert and delete alone do not implement every ordering policy. - Report the result. Emit a concise summary of inserted, removed, reordered, and unchanged items, without exposing secrets. A rerun after a failure should compare state again and reach the intended result safely.
Google documents the required insert fields and delete identifier in the insert, delete, and update references. The list-and-diff approach is an implementation choice: it reduces needless writes and makes retries more predictable, but your script must still handle partial failures and verify current state.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Account for quota and API edge cases
Google’s YouTube Data API reference pages list these quota costs per call; the pages do not state a publication year in the retrieved content:
| Operation | Quota cost per call | Reference |
|---|---|---|
playlistItems.list |
1 unit | List reference |
playlistItems.insert |
50 units | Insert reference |
playlistItems.delete |
50 units | Delete reference |
Listing and comparing before writing can avoid spending quota on unchanged entries. Check the project’s current quota allocation and limits in Google’s project console; the per-call costs above do not establish your project’s overall allowance.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Not every playlist or video can necessarily be changed. The API documents errors for inaccessible items, duplicate entries, playlists at the maximum item count, and unsupported playlist operations. Handle API errors explicitly and avoid assuming system or special playlists support the same operations as an ordinary editable playlist. See the insert and delete error references.
Troubleshoot missed or failed rotations
| Symptom | Likely cause | What to check or do |
|---|---|---|
| No scheduled run appears | The workflow file or schedule change is not on the default branch, or a public repository’s schedule was disabled after 60 days without activity. | Confirm the workflow is present on the default branch and inspect recent repository activity. Trigger workflow_dispatch to test or recover. |
| The run starts late or not at all | GitHub schedule events are best-effort; high load can delay runs and queued runs can be dropped. | Review the Actions run history, use a manual recovery run, and do not assume the requested cron minute is the actual start time. |
| Playlist writes return unauthorized | The workflow lacks a valid OAuth token, the token is expired or unavailable, or the authorization scope is insufficient. | Check the OAuth setup and secret names, confirm the required scope, and renew or repair the configured token strategy. Do not substitute an API key. |
| Delete fails for an item | The request may contain a video ID instead of the playlist-item ID, or the playlist may not support that operation. | List the playlist again, use the result’s id for deletion, and inspect the API error before retrying. |
| Insert fails for one or more videos | The video may be inaccessible, already present, or the playlist may be full or unsupported. | Check the video and playlist state, then update the desired configuration rather than retrying an unchanged invalid request indefinitely. |
| Repeated runs create duplicates or remove the wrong item | The script assumes stale state or treats video IDs and playlist-item IDs as interchangeable. | Re-list current entries before mutations, diff against the configured desired state, and make the operation idempotent. |
| Rotation order is wrong | The script inserts and deletes but does not explicitly update item positions. | Use playlistItems.update when the policy requires a specific order, then verify the resulting list. |
Or let it run in the cloud
GitHub Actions automates playlist changes; it is not a service for keeping a pre-recorded YouTube live stream continuously on air. If your goal is an always-on live stream from uploaded videos, StreamNeo is a separate YouTube-only option: upload a recording or build a playlist, add your YouTube stream key once, and go live. Nothing has to stay on at home; it streams your upload at its original quality up to 4K 60fps for one flat price per slot, and automatically recovers if YouTube drops the stream. The first day is free with no card. Monthly: $9.99 per month. Start the free first day with StreamNeo.
Frequently Asked Questions
Can a scheduled GitHub Actions workflow run more often than every five minutes?
No. GitHub documents five minutes as the shortest scheduled-workflow interval.
Does a YouTube API key let the workflow edit a playlist?
No. Playlist write operations require OAuth authorization with a supported YouTube scope.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

