Update /etc/crontab to quit a process as root every other minute during working hours

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












How can i update /etc/crontab to quit a process as root every other minute during working hours, as in this case is 0800-1600, monday-saturday. How can I also allow the same process to be active between 12.00-12.30 and between 16:00-07:59?



sudo nano /etc/crontab









share|improve this question























  • Don't you know the command to run or how to setup the timetable?
    – PerlDuck
    Feb 28 at 9:29














up vote
0
down vote

favorite












How can i update /etc/crontab to quit a process as root every other minute during working hours, as in this case is 0800-1600, monday-saturday. How can I also allow the same process to be active between 12.00-12.30 and between 16:00-07:59?



sudo nano /etc/crontab









share|improve this question























  • Don't you know the command to run or how to setup the timetable?
    – PerlDuck
    Feb 28 at 9:29












up vote
0
down vote

favorite









up vote
0
down vote

favorite











How can i update /etc/crontab to quit a process as root every other minute during working hours, as in this case is 0800-1600, monday-saturday. How can I also allow the same process to be active between 12.00-12.30 and between 16:00-07:59?



sudo nano /etc/crontab









share|improve this question















How can i update /etc/crontab to quit a process as root every other minute during working hours, as in this case is 0800-1600, monday-saturday. How can I also allow the same process to be active between 12.00-12.30 and between 16:00-07:59?



sudo nano /etc/crontab






16.04 cron time etc






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 28 at 10:51

























asked Feb 28 at 7:36







user786034


















  • Don't you know the command to run or how to setup the timetable?
    – PerlDuck
    Feb 28 at 9:29
















  • Don't you know the command to run or how to setup the timetable?
    – PerlDuck
    Feb 28 at 9:29















Don't you know the command to run or how to setup the timetable?
– PerlDuck
Feb 28 at 9:29




Don't you know the command to run or how to setup the timetable?
– PerlDuck
Feb 28 at 9:29










1 Answer
1






active

oldest

votes

















up vote
0
down vote













It's not possible to set this up in just one crontab line (at least I don't know a way right now) so you have to setup two jobs:



  • one for the hours 8-11 and 13-15 that runs every minute (i.e. 08:00-11:59 and 13:00-15:59)

  • and one for the minutes 31-59 in hour 12 (i.e. 12:31-12:59)

* 8-11,13-15 * * 1-6 /usr/bin/killall firefox
31-59 12 * * 1-6 /usr/bin/killall firefox


The 1-6 means monday to saturday



Add these to lines not to /etc/crontab but to root's crontab instead by issuing



sudo crontab -e


Change the command (killall …) to your needs.






share|improve this answer






















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    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',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1010540%2fupdate-etc-crontab-to-quit-a-process-as-root-every-other-minute-during-working%23new-answer', 'question_page');

    );

    Post as a guest





























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    It's not possible to set this up in just one crontab line (at least I don't know a way right now) so you have to setup two jobs:



    • one for the hours 8-11 and 13-15 that runs every minute (i.e. 08:00-11:59 and 13:00-15:59)

    • and one for the minutes 31-59 in hour 12 (i.e. 12:31-12:59)

    * 8-11,13-15 * * 1-6 /usr/bin/killall firefox
    31-59 12 * * 1-6 /usr/bin/killall firefox


    The 1-6 means monday to saturday



    Add these to lines not to /etc/crontab but to root's crontab instead by issuing



    sudo crontab -e


    Change the command (killall …) to your needs.






    share|improve this answer


























      up vote
      0
      down vote













      It's not possible to set this up in just one crontab line (at least I don't know a way right now) so you have to setup two jobs:



      • one for the hours 8-11 and 13-15 that runs every minute (i.e. 08:00-11:59 and 13:00-15:59)

      • and one for the minutes 31-59 in hour 12 (i.e. 12:31-12:59)

      * 8-11,13-15 * * 1-6 /usr/bin/killall firefox
      31-59 12 * * 1-6 /usr/bin/killall firefox


      The 1-6 means monday to saturday



      Add these to lines not to /etc/crontab but to root's crontab instead by issuing



      sudo crontab -e


      Change the command (killall …) to your needs.






      share|improve this answer
























        up vote
        0
        down vote










        up vote
        0
        down vote









        It's not possible to set this up in just one crontab line (at least I don't know a way right now) so you have to setup two jobs:



        • one for the hours 8-11 and 13-15 that runs every minute (i.e. 08:00-11:59 and 13:00-15:59)

        • and one for the minutes 31-59 in hour 12 (i.e. 12:31-12:59)

        * 8-11,13-15 * * 1-6 /usr/bin/killall firefox
        31-59 12 * * 1-6 /usr/bin/killall firefox


        The 1-6 means monday to saturday



        Add these to lines not to /etc/crontab but to root's crontab instead by issuing



        sudo crontab -e


        Change the command (killall …) to your needs.






        share|improve this answer














        It's not possible to set this up in just one crontab line (at least I don't know a way right now) so you have to setup two jobs:



        • one for the hours 8-11 and 13-15 that runs every minute (i.e. 08:00-11:59 and 13:00-15:59)

        • and one for the minutes 31-59 in hour 12 (i.e. 12:31-12:59)

        * 8-11,13-15 * * 1-6 /usr/bin/killall firefox
        31-59 12 * * 1-6 /usr/bin/killall firefox


        The 1-6 means monday to saturday



        Add these to lines not to /etc/crontab but to root's crontab instead by issuing



        sudo crontab -e


        Change the command (killall …) to your needs.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Feb 28 at 9:48

























        answered Feb 28 at 9:42









        PerlDuck

        4,03311030




        4,03311030



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1010540%2fupdate-etc-crontab-to-quit-a-process-as-root-every-other-minute-during-working%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            pylint3 and pip3 broken

            Missing snmpget and snmpwalk

            How to enroll fingerprints to Ubuntu 17.10 with VFS491