{"id":136094,"date":"2026-06-08T03:55:08","date_gmt":"2026-06-08T00:55:08","guid":{"rendered":"https:\/\/vpesports.com\/minecraft\/mods\/schedule-shutdown\/"},"modified":"2026-06-08T03:55:08","modified_gmt":"2026-06-08T00:55:08","slug":"schedule-shutdown","status":"publish","type":"mod","link":"https:\/\/vpesports.com\/minecraft\/mods\/schedule-shutdown\/","title":{"rendered":"Schedule Shutdown"},"content":{"rendered":"<p># Schedule Shutdown<\/p>\n<p>A Minecraft data pack containing functions that will stop the server after a duration of time.<\/p>\n<p>**Important**: To use this datapack, you need to be running a dedicated server with `function-permission-level` in `server.properties` to `4`. This datapack **will not function** (get it? :D) in a singleplayer world.<\/p>\n<p>**Important**: Except for `NO_AUTO_SHUTDOWN.zip`, all versions will automatically shut down the server after the specified length of time. See [Auto-Shutdown](#auto-shutdown) for an explanation of what this means and why I did it like that.<\/p>\n<p>Below is a list of available delays. Each one triggers the one below it. (I did this in a not dumb way, with 5hrs triggering 1hr after 4hrs, 1hr trigger 15min after 45min, etc.)<\/p>\n<p>&#8211; 5hrs<br \/>\n&#8211; 1hr<br \/>\n&#8211; 15min<br \/>\n&#8211; 5min<br \/>\n&#8211; 1min<\/p>\n<p>Any scheduled shutdowns are cancelled upon starting the server.<\/p>\n<p>## Examples<\/p>\n<p>&#8220;`mcfunction<br \/>\n# Shut down the server in 5hrs. See src\/data\/schedule_shutdown\/functions\/delay\/* for function names.<br \/>\nfunction schedule_shutdown:delay\/five_hours<\/p>\n<p># Cancel a scheduled shutdown.<br \/>\nfunction schedule_shutdown:clear_all<br \/>\n&#8220;`<\/p>\n<p>## Auto-Shutdown<\/p>\n<p>I originally made this datapack because I had figured out how to host a Minecraft server in GitHub Actions, but needed the server to automatically close with enough time left to save the server state to the repo. That&#8217;s why there is a 5 hour version (max GitHub workflow run time is 6 hours). The files with a name like `length_of_time.zip` will automatically run the function `schedule_shutdown:delay\/length_of_time` when the server loads (using Minecraft&#8217;s `load.json`). Unless you want your server to automatically shut down after a length of time, use `NO_AUTO_SHUTDOWN.zip`.<\/p>\n<p>## FAQ\/Troubleshooting<\/p>\n<details>\n<summary>Failed to load function schedule_shutdown:shutdown<\/summary>\n<p>  Same as `Couldn&#8217;t load tag schedule_shutdown:all_shutdown as it is missing following references: schedule_shutdown:shutdown`.<br \/>\n<\/details>\n<details>\n<summary>Couldn&#8217;t load tag schedule_shutdown:all_shutdown as it is missing following references: schedule_shutdown:shutdown<\/summary>\n<p>  Make sure you set the `function-permission-level` in `server.properties` to `4` and try starting the server again. If you still have this error, please open an issue in the GitHub repo.<br \/>\n<\/details>\n","protected":false},"excerpt":{"rendered":"<p>Shut down your server after a duration of time has passed.<\/p>\n","protected":false},"featured_media":0,"template":"","meta":{"_minecraft_slug":"schedule-shutdown","_minecraft_project_id":"Ul8ZKiCr","_minecraft_author":"AdamRaichu","_minecraft_license":"MIT","_minecraft_downloads":435,"_minecraft_follows":0,"_minecraft_client_side":"optional","_minecraft_server_side":"required","_minecraft_storage_type":"zip","_minecraft_archive_name":"schedule-shutdown.zip","_minecraft_size_bytes":11749,"_minecraft_version_count":12,"_minecraft_updated_at":"2026-05-15T18:51:28.572195Z","_minecraft_date_created":"2023-12-18T00:51:42.517702Z","_minecraft_date_modified":"2023-12-24T22:24:05.336415Z","_minecraft_project_url":"https:\/\/modrinth.com\/mod\/schedule-shutdown","_minecraft_icon_attachment_id":0,"_minecraft_imported_at":"2026-06-08T00:55:09+00:00","_minecraft_import_hash":"1ef51536a03f15c0ca00ddc98b890cd5","_minecraft_versions":"","_minecraft_links":"","_minecraft_gallery":"","_minecraft_api_metadata":""},"mod_category":[84,126,92],"mod_loader":[86],"minecraft_version":[94],"class_list":["post-136094","mod","type-mod","status-publish","hentry","mod_category-datapack","mod_category-management","mod_category-utility","mod_loader-datapack","minecraft_version-1-20-4"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Schedule Shutdown - Minecraft<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vpesports.com\/minecraft\/mods\/schedule-shutdown\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Schedule Shutdown - Minecraft\" \/>\n<meta property=\"og:description\" content=\"Shut down your server after a duration of time has passed.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vpesports.com\/minecraft\/mods\/schedule-shutdown\/\" \/>\n<meta property=\"og:site_name\" content=\"Minecraft\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/schedule-shutdown\\\/\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/schedule-shutdown\\\/\",\"name\":\"Schedule Shutdown - Minecraft\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\"},\"datePublished\":\"2026-06-08T00:55:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/schedule-shutdown\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/schedule-shutdown\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/schedule-shutdown\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mods\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Schedule Shutdown\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\",\"name\":\"Minecraft\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Schedule Shutdown - Minecraft","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vpesports.com\/minecraft\/mods\/schedule-shutdown\/","og_locale":"en_US","og_type":"article","og_title":"Schedule Shutdown - Minecraft","og_description":"Shut down your server after a duration of time has passed.","og_url":"https:\/\/vpesports.com\/minecraft\/mods\/schedule-shutdown\/","og_site_name":"Minecraft","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vpesports.com\/minecraft\/mods\/schedule-shutdown\/","url":"https:\/\/vpesports.com\/minecraft\/mods\/schedule-shutdown\/","name":"Schedule Shutdown - Minecraft","isPartOf":{"@id":"https:\/\/vpesports.com\/minecraft\/#website"},"datePublished":"2026-06-08T00:55:08+00:00","breadcrumb":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/schedule-shutdown\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vpesports.com\/minecraft\/mods\/schedule-shutdown\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/vpesports.com\/minecraft\/mods\/schedule-shutdown\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vpesports.com\/minecraft\/"},{"@type":"ListItem","position":2,"name":"Mods","item":"https:\/\/vpesports.com\/minecraft\/mods\/"},{"@type":"ListItem","position":3,"name":"Schedule Shutdown"}]},{"@type":"WebSite","@id":"https:\/\/vpesports.com\/minecraft\/#website","url":"https:\/\/vpesports.com\/minecraft\/","name":"Minecraft","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vpesports.com\/minecraft\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod\/136094","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod"}],"about":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/types\/mod"}],"wp:attachment":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media?parent=136094"}],"wp:term":[{"taxonomy":"mod_category","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_category?post=136094"},{"taxonomy":"mod_loader","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_loader?post=136094"},{"taxonomy":"minecraft_version","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/minecraft_version?post=136094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}