Execute command in cmd once every hour












0















I've setup Minecraft with Dynmap and it works like it should. Though I would like it to run a specific command every hour.



I start the server by running a file called run.bat which looks like this



java -Xmx1024M -jar craftbukkit.jar -o true
PAUSE


This starts the server and the Dynmap plugin. I can then execute commands in the cmd window that opens to do different things.



The command that I want to execute every hour looks like this:



dynmap fullrender world and is executed in an already started program, is it possible to schedule a command in cmd so that it is executed once every hour?










share|improve this question

























  • This information is available in a lot of places on the internet, and on this forum if you search. Using the terms you entered I found numerous resources that explain it.

    – Taegost
    Jul 22 '13 at 13:57











  • You won't be able to do this except from another plugin or a server wrapper. If you're on Windows, I made yams.in which now allows scheduling of any command directly into the console.

    – Richard Benson
    Jul 22 '13 at 17:11
















0















I've setup Minecraft with Dynmap and it works like it should. Though I would like it to run a specific command every hour.



I start the server by running a file called run.bat which looks like this



java -Xmx1024M -jar craftbukkit.jar -o true
PAUSE


This starts the server and the Dynmap plugin. I can then execute commands in the cmd window that opens to do different things.



The command that I want to execute every hour looks like this:



dynmap fullrender world and is executed in an already started program, is it possible to schedule a command in cmd so that it is executed once every hour?










share|improve this question

























  • This information is available in a lot of places on the internet, and on this forum if you search. Using the terms you entered I found numerous resources that explain it.

    – Taegost
    Jul 22 '13 at 13:57











  • You won't be able to do this except from another plugin or a server wrapper. If you're on Windows, I made yams.in which now allows scheduling of any command directly into the console.

    – Richard Benson
    Jul 22 '13 at 17:11














0












0








0








I've setup Minecraft with Dynmap and it works like it should. Though I would like it to run a specific command every hour.



I start the server by running a file called run.bat which looks like this



java -Xmx1024M -jar craftbukkit.jar -o true
PAUSE


This starts the server and the Dynmap plugin. I can then execute commands in the cmd window that opens to do different things.



The command that I want to execute every hour looks like this:



dynmap fullrender world and is executed in an already started program, is it possible to schedule a command in cmd so that it is executed once every hour?










share|improve this question
















I've setup Minecraft with Dynmap and it works like it should. Though I would like it to run a specific command every hour.



I start the server by running a file called run.bat which looks like this



java -Xmx1024M -jar craftbukkit.jar -o true
PAUSE


This starts the server and the Dynmap plugin. I can then execute commands in the cmd window that opens to do different things.



The command that I want to execute every hour looks like this:



dynmap fullrender world and is executed in an already started program, is it possible to schedule a command in cmd so that it is executed once every hour?







windows command-line minecraft






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 22 '13 at 14:26









David

4,31121737




4,31121737










asked Jul 22 '13 at 13:45









Oskar PerssonOskar Persson

71821227




71821227













  • This information is available in a lot of places on the internet, and on this forum if you search. Using the terms you entered I found numerous resources that explain it.

    – Taegost
    Jul 22 '13 at 13:57











  • You won't be able to do this except from another plugin or a server wrapper. If you're on Windows, I made yams.in which now allows scheduling of any command directly into the console.

    – Richard Benson
    Jul 22 '13 at 17:11



















  • This information is available in a lot of places on the internet, and on this forum if you search. Using the terms you entered I found numerous resources that explain it.

    – Taegost
    Jul 22 '13 at 13:57











  • You won't be able to do this except from another plugin or a server wrapper. If you're on Windows, I made yams.in which now allows scheduling of any command directly into the console.

    – Richard Benson
    Jul 22 '13 at 17:11

















This information is available in a lot of places on the internet, and on this forum if you search. Using the terms you entered I found numerous resources that explain it.

– Taegost
Jul 22 '13 at 13:57





This information is available in a lot of places on the internet, and on this forum if you search. Using the terms you entered I found numerous resources that explain it.

– Taegost
Jul 22 '13 at 13:57













You won't be able to do this except from another plugin or a server wrapper. If you're on Windows, I made yams.in which now allows scheduling of any command directly into the console.

– Richard Benson
Jul 22 '13 at 17:11





You won't be able to do this except from another plugin or a server wrapper. If you're on Windows, I made yams.in which now allows scheduling of any command directly into the console.

– Richard Benson
Jul 22 '13 at 17:11










2 Answers
2






active

oldest

votes


















2














You can use the Windows Task Scheduler to schedule it.
From the steps here: http://windows.microsoft.com/en-us/windows7/schedule-a-task



Open Task Scheduler by clicking the Start button Picture of the Start button, clicking Control Panel, clicking System and Security, clicking Administrative Tools, and then double-clicking Task Scheduler.‌ Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.



Click the Action menu, and then click Create Basic Task.



Type a name for the task and an optional description, and then click Next.



Do one of the following:



To select a schedule based on the calendar, click Daily, Weekly, Monthly, or One time, click Next; specify the schedule you want to use, and then click Next.



To select a schedule based on common recurring events, click When the computer starts or When I log on, and then click Next.



To select a schedule based on specific events, click When a specific event is logged, click Next; specify the event log and other information using the drop-down lists, and then click Next.



To schedule a program to start automatically, click Start a program, and then click Next.



Click Browse to find the program you want to start, and then click Next.



Click Finish.






share|improve this answer
























  • I know I can start a program from the task scheduler but I need to execute dynmap fullrender world in an already started program.

    – Oskar Persson
    Jul 22 '13 at 13:59











  • Your question wasn't clear at all on that point, you need to update your original question or you're going to get a lot of people giving you this same information.

    – Taegost
    Jul 22 '13 at 14:00











  • Updated my question

    – Oskar Persson
    Jul 22 '13 at 14:03



















0














Try something like:



> for /L %i in (1,1,24) do timeout /T 3600 <command>


3600 represents a time in seconds.



60 × 60 = 3600s


The command for will loop from 1 to 24, running timeout... each time, which waits 3600 seconds and then executes the command.



See page: timeout command.






share|improve this answer

























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f622694%2fexecute-command-in-cmd-once-every-hour%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    You can use the Windows Task Scheduler to schedule it.
    From the steps here: http://windows.microsoft.com/en-us/windows7/schedule-a-task



    Open Task Scheduler by clicking the Start button Picture of the Start button, clicking Control Panel, clicking System and Security, clicking Administrative Tools, and then double-clicking Task Scheduler.‌ Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.



    Click the Action menu, and then click Create Basic Task.



    Type a name for the task and an optional description, and then click Next.



    Do one of the following:



    To select a schedule based on the calendar, click Daily, Weekly, Monthly, or One time, click Next; specify the schedule you want to use, and then click Next.



    To select a schedule based on common recurring events, click When the computer starts or When I log on, and then click Next.



    To select a schedule based on specific events, click When a specific event is logged, click Next; specify the event log and other information using the drop-down lists, and then click Next.



    To schedule a program to start automatically, click Start a program, and then click Next.



    Click Browse to find the program you want to start, and then click Next.



    Click Finish.






    share|improve this answer
























    • I know I can start a program from the task scheduler but I need to execute dynmap fullrender world in an already started program.

      – Oskar Persson
      Jul 22 '13 at 13:59











    • Your question wasn't clear at all on that point, you need to update your original question or you're going to get a lot of people giving you this same information.

      – Taegost
      Jul 22 '13 at 14:00











    • Updated my question

      – Oskar Persson
      Jul 22 '13 at 14:03
















    2














    You can use the Windows Task Scheduler to schedule it.
    From the steps here: http://windows.microsoft.com/en-us/windows7/schedule-a-task



    Open Task Scheduler by clicking the Start button Picture of the Start button, clicking Control Panel, clicking System and Security, clicking Administrative Tools, and then double-clicking Task Scheduler.‌ Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.



    Click the Action menu, and then click Create Basic Task.



    Type a name for the task and an optional description, and then click Next.



    Do one of the following:



    To select a schedule based on the calendar, click Daily, Weekly, Monthly, or One time, click Next; specify the schedule you want to use, and then click Next.



    To select a schedule based on common recurring events, click When the computer starts or When I log on, and then click Next.



    To select a schedule based on specific events, click When a specific event is logged, click Next; specify the event log and other information using the drop-down lists, and then click Next.



    To schedule a program to start automatically, click Start a program, and then click Next.



    Click Browse to find the program you want to start, and then click Next.



    Click Finish.






    share|improve this answer
























    • I know I can start a program from the task scheduler but I need to execute dynmap fullrender world in an already started program.

      – Oskar Persson
      Jul 22 '13 at 13:59











    • Your question wasn't clear at all on that point, you need to update your original question or you're going to get a lot of people giving you this same information.

      – Taegost
      Jul 22 '13 at 14:00











    • Updated my question

      – Oskar Persson
      Jul 22 '13 at 14:03














    2












    2








    2







    You can use the Windows Task Scheduler to schedule it.
    From the steps here: http://windows.microsoft.com/en-us/windows7/schedule-a-task



    Open Task Scheduler by clicking the Start button Picture of the Start button, clicking Control Panel, clicking System and Security, clicking Administrative Tools, and then double-clicking Task Scheduler.‌ Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.



    Click the Action menu, and then click Create Basic Task.



    Type a name for the task and an optional description, and then click Next.



    Do one of the following:



    To select a schedule based on the calendar, click Daily, Weekly, Monthly, or One time, click Next; specify the schedule you want to use, and then click Next.



    To select a schedule based on common recurring events, click When the computer starts or When I log on, and then click Next.



    To select a schedule based on specific events, click When a specific event is logged, click Next; specify the event log and other information using the drop-down lists, and then click Next.



    To schedule a program to start automatically, click Start a program, and then click Next.



    Click Browse to find the program you want to start, and then click Next.



    Click Finish.






    share|improve this answer













    You can use the Windows Task Scheduler to schedule it.
    From the steps here: http://windows.microsoft.com/en-us/windows7/schedule-a-task



    Open Task Scheduler by clicking the Start button Picture of the Start button, clicking Control Panel, clicking System and Security, clicking Administrative Tools, and then double-clicking Task Scheduler.‌ Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.



    Click the Action menu, and then click Create Basic Task.



    Type a name for the task and an optional description, and then click Next.



    Do one of the following:



    To select a schedule based on the calendar, click Daily, Weekly, Monthly, or One time, click Next; specify the schedule you want to use, and then click Next.



    To select a schedule based on common recurring events, click When the computer starts or When I log on, and then click Next.



    To select a schedule based on specific events, click When a specific event is logged, click Next; specify the event log and other information using the drop-down lists, and then click Next.



    To schedule a program to start automatically, click Start a program, and then click Next.



    Click Browse to find the program you want to start, and then click Next.



    Click Finish.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jul 22 '13 at 13:56









    TaegostTaegost

    632518




    632518













    • I know I can start a program from the task scheduler but I need to execute dynmap fullrender world in an already started program.

      – Oskar Persson
      Jul 22 '13 at 13:59











    • Your question wasn't clear at all on that point, you need to update your original question or you're going to get a lot of people giving you this same information.

      – Taegost
      Jul 22 '13 at 14:00











    • Updated my question

      – Oskar Persson
      Jul 22 '13 at 14:03



















    • I know I can start a program from the task scheduler but I need to execute dynmap fullrender world in an already started program.

      – Oskar Persson
      Jul 22 '13 at 13:59











    • Your question wasn't clear at all on that point, you need to update your original question or you're going to get a lot of people giving you this same information.

      – Taegost
      Jul 22 '13 at 14:00











    • Updated my question

      – Oskar Persson
      Jul 22 '13 at 14:03

















    I know I can start a program from the task scheduler but I need to execute dynmap fullrender world in an already started program.

    – Oskar Persson
    Jul 22 '13 at 13:59





    I know I can start a program from the task scheduler but I need to execute dynmap fullrender world in an already started program.

    – Oskar Persson
    Jul 22 '13 at 13:59













    Your question wasn't clear at all on that point, you need to update your original question or you're going to get a lot of people giving you this same information.

    – Taegost
    Jul 22 '13 at 14:00





    Your question wasn't clear at all on that point, you need to update your original question or you're going to get a lot of people giving you this same information.

    – Taegost
    Jul 22 '13 at 14:00













    Updated my question

    – Oskar Persson
    Jul 22 '13 at 14:03





    Updated my question

    – Oskar Persson
    Jul 22 '13 at 14:03













    0














    Try something like:



    > for /L %i in (1,1,24) do timeout /T 3600 <command>


    3600 represents a time in seconds.



    60 × 60 = 3600s


    The command for will loop from 1 to 24, running timeout... each time, which waits 3600 seconds and then executes the command.



    See page: timeout command.






    share|improve this answer






























      0














      Try something like:



      > for /L %i in (1,1,24) do timeout /T 3600 <command>


      3600 represents a time in seconds.



      60 × 60 = 3600s


      The command for will loop from 1 to 24, running timeout... each time, which waits 3600 seconds and then executes the command.



      See page: timeout command.






      share|improve this answer




























        0












        0








        0







        Try something like:



        > for /L %i in (1,1,24) do timeout /T 3600 <command>


        3600 represents a time in seconds.



        60 × 60 = 3600s


        The command for will loop from 1 to 24, running timeout... each time, which waits 3600 seconds and then executes the command.



        See page: timeout command.






        share|improve this answer















        Try something like:



        > for /L %i in (1,1,24) do timeout /T 3600 <command>


        3600 represents a time in seconds.



        60 × 60 = 3600s


        The command for will loop from 1 to 24, running timeout... each time, which waits 3600 seconds and then executes the command.



        See page: timeout command.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 16 at 19:09









        Scott

        15.9k113990




        15.9k113990










        answered Jul 22 '13 at 13:58









        stderrstderr

        8,94722044




        8,94722044






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f622694%2fexecute-command-in-cmd-once-every-hour%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

            Alcedinidae

            Origin of the phrase “under your belt”?