Results 1 to 5 of 5

Thread: how to use cron to stop a program

  1. #1
    Join Date
    Apr 2008
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    how to use cron to stop a program

    How do I use cron to stop or shut down a program eg azureus at a certain time?

    Tried the man cron but it did not make sense.
    Thanks to all.
    I would rather be Ubuntu-ing.

    Don't shake my hand. I don't want your germs.

  2. #2
    Join Date
    Jan 2007
    Beans
    5,549

    Re: how to use cron to stop a program

    15 4 * * * killall deluge

    i use the above line in cron to stop deluge at 4:15am . So i guess you could replace deluge with your program and try..

  3. #3
    Join Date
    Apr 2008
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: how to use cron to stop a program

    Quote Originally Posted by superprash2003 View Post
    15 4 * * * killall deluge

    i use the above line in cron to stop deluge at 4:15am . So i guess you could replace deluge with your program and try..
    Do I put that in the terminal or in the crontab?
    I would rather be Ubuntu-ing.

    Don't shake my hand. I don't want your germs.

  4. #4
    Join Date
    Jan 2007
    Location
    Melbourne, Australia
    Beans
    5,096

    Re: how to use cron to stop a program

    Hi, you can add it by typing in a terminal
    Code:
    crontab -e
    https://help.ubuntu.com/community/CronHowto
    Ubuntu Newbie Help: irc: #beginners-help on network irc.freenode.net
    Help others, mark your threads solved.

  5. #5
    Join Date
    Dec 2005
    Location
    Western Australia
    Beans
    11,480
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: how to use cron to stop a program

    There is a program in the repositories called gCronTab, that makes it easy to set cron jobs and swap around crontab files.

    Great minds think alike - I use my home server's crontab to start and stop my bittorrent as well! I use "transmission-daemon" with the web interface, and my crontab sends commands to Transmission-Daemon using the "transmission-remote" command. I don't actually start and stop the daemon, I just use --downlimit 0 and --uplimit 0 to stop torrenting, and then --no-downlimit and --no-uplimit to get it going again.
    I try to treat the cause, not the symptom. I avoid the terminal in instructions, unless it's easier or necessary. My instructions will work within the Ubuntu system, instead of breaking or subverting it. Those are the three guarantees to the helpee.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •