Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: launch deluge autoomatically using scheduled tasks

  1. #1
    Join Date
    Apr 2011
    Beans
    16

    launch deluge autoomatically using scheduled tasks

    hey i'v got a situation..

    i want to launch deluge using scheduled tasks..,,
    everyday at 02:10am...(i don't want to use deluge scheduler)

    i want to know command and default behaviour.

    &if posible..give me a command so that my system automatically shuts down at 7am...

    please help..i need a solution..

    i am using ubuntu 10.10

    thank you
    Last edited by steninj; April 18th, 2011 at 02:19 AM.

  2. #2
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,263
    Distro
    Ubuntu

    Re: launch deluge autoomatically using scheduled tasks

    To schedule tasks, you need cron. Google cron (or type man 5 crontab in a terminal) to find out how it works.

    Type the following command from the terminal or from Alt-F2:
    Code:
    VISUAL='gedit' crontab -e
    This will bring up your cron table, which is probably empty.

    Enter the following lines (blank lines and lines starting with # are comments and are ignored).
    Code:
    # Prevent filling up your mailbox.
    MAILTO=''
    
    # Start Deluge every day at 2:10 a.m.
    10 2 * * * deluge
    Save the file and close gedit.

    To shut down, enter the shutdown command into Alt-F2 (type man shutdown into a terminal to find how it works).
    Code:
    sudo shutdown -P 7:00
    Note: If you use a terminal, you will have to modify the command so that you can close the terminal:
    Code:
    sudo nohup shutdown -P 7:00 &>/dev/null &
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  3. #3
    Join Date
    Apr 2011
    Beans
    16

    Re: launch deluge autoomatically using scheduled tasks

    thnx for ur interest Paddy Landau,,
    but its not working

  4. #4
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,263
    Distro
    Ubuntu

    Re: launch deluge autoomatically using scheduled tasks

    Quote Originally Posted by steninj View Post
    thnx for ur interest Paddy Landau,,
    but its not working
    You need to be much more specific than that. Remember that I can't see your computer.

    What's not working -- Deluge or shutdown or amending your crontab?

    How do you know it's not working -- does it give an error? Does Deluge simply not start? What exactly is (or is not) going on?
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  5. #5
    Join Date
    Apr 2011
    Beans
    16

    Re: launch deluge autoomatically using scheduled tasks

    am really sorry for that,,now i will explain...

    "VISUAL='gedit' crontab -e" i tried this command in alt+F2..
    then i get this error..
    "Could not open location 'file:///home/stenin/VISUAL='gedit'%20crontab%20-e'"

    Error stating file '/home/stenin/VISUAL='gedit' crontab -e': No such file or directory...

    then i tried it in terminal...
    i saved it and closed gedit..
    but i get this message in terminal..



    stenin@DreamER:~$ VISUAL='gedit' crontab -e

    (gedit:3605): Gtk-WARNING **: Attempting to store changes into `/home/stenin/.recently-used.xbel', but failed: Failed to rename file '/home/stenin/.recently-used.xbel.JJX6TV' to '/home/stenin/.recently-used.xbel': g_rename() failed: Operation not permitted

    (gedit:3605): Gtk-WARNING **: Attempting to set the permissions of `/home/stenin/.recently-used.xbel', but failed: Operation not permitted

    (gedit:3605): Gtk-WARNING **: Attempting to store changes into `/home/stenin/.recently-used.xbel', but failed: Failed to rename file '/home/stenin/.recently-used.xbel.D3O5TV' to '/home/stenin/.recently-used.xbel': g_rename() failed: Operation not permitted

    (gedit:3605): Gtk-WARNING **: Attempting to set the permissions of `/home/stenin/.recently-used.xbel', but failed: Operation not permitted

    (gedit:3605): Gtk-WARNING **: Attempting to store changes into `/home/stenin/.recently-used.xbel', but failed: Failed to rename file '/home/stenin/.recently-used.xbel.DODOTV' to '/home/stenin/.recently-used.xbel': g_rename() failed: Operation not permitted

    (gedit:3605): Gtk-WARNING **: Attempting to set the permissions of `/home/stenin/.recently-used.xbel', but failed: Operation not permitted

    (gedit:3605): Gtk-WARNING **: Attempting to store changes into `/home/stenin/.recently-used.xbel', but failed: Failed to rename file '/home/stenin/.recently-used.xbel.R4C9TV' to '/home/stenin/.recently-used.xbel': g_rename() failed: Operation not permitted

    (gedit:3605): Gtk-WARNING **: Attempting to set the permissions of `/home/stenin/.recently-used.xbel', but failed: Operation not permitted
    crontab: installing new crontab
    stenin@DreamER:~$



    i will try shutdown commmand later and tell you..

    now,,

    YOU PLEASE CONSIDER THIS TOO

    i'v launched deluge&shutdown command osuccessfully in one of the previous version of ubuntu..


    i opened "scheduled tasks" using some command...
    then i add a recurrent task,one for deluge& one for shutdown..

    i used this command i think.. "deluge --ui=gtk"

    i don't have the shutdown command with me now

    now i forgot even its "default behaviour" which i used then..
    i'v no idea about programng and all,i got this commands from some sites..

    thank u Paddy Landau...

  6. #6
    Join Date
    Aug 2008
    Location
    Hmm..$whereis?
    Beans
    136
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: launch deluge autoomatically using scheduled tasks

    Since deluge is a gui application you need to specify the display environment variable in the crontab.. like
    10 2 * * * export DISPLAY=:0.0 && /usr/bin/deluge

    Also to shutdown...you have to add the following to the root's crontab
    00 07 * * * halt
    adding sudo shutdown to your crontab will not work...as you won't be able to enter the sudo password.
    Last edited by BugBuster; April 19th, 2011 at 01:09 PM.
    Debian 6.0.1(Squeeze)/64bit
    **************************
    MSI K9AGM4-L | AMD Athlon64 X2 4000+ | 2x1GB DDR2 800MHZ(Transcend) | ATI Radeon Xpress 1250(Onboard) | Seagate 250GB SATA II | Acer AL1916W

  7. #7
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,263
    Distro
    Ubuntu

    Re: launch deluge autoomatically using scheduled tasks

    Quote Originally Posted by steninj View Post
    "VISUAL='gedit' crontab -e" i tried this command in alt+F2..
    then i get this error..
    "Could not open location 'file:///home/stenin/VISUAL='gedit'%20crontab%20-e'"
    Sorry, that was my mistake. You were right to try it from the terminal.

    Quote Originally Posted by steninj View Post
    i saved it and closed gedit..
    but i get this message in terminal..
    That is a bit strange. Please try this (in a terminal):
    Code:
    cd ~
    sudo chown stenin:stenin .recently*
    Then try again to edit your crontab.

    BugBuster is right about putting halt into your root's crontab if you want to execute it every day.
    Code:
    sudo VISUAL='gedit' crontab -e
    I had understood it was a one-off request, in which case entering it into the terminal as I showed you would do fine.
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  8. #8
    Join Date
    Apr 2011
    Beans
    16

    Arrow Re: launch deluge autoomatically using scheduled tasks

    thank u guys,
    but

    it shows this error..

    chown: changing ownership of `.recently-used.xbel': Operation not permitted


    but now am able to shut down automatically...
    i used this command in scheduled tasks.. "/sbin/shutdown -h now"

    &i used this command to get sch.tasks.. "sudo gnome-schedule"


    i want deluge to be launched everyday,at a specific time..

  9. #9
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,263
    Distro
    Ubuntu

    Re: launch deluge autoomatically using scheduled tasks

    Quote Originally Posted by steninj View Post
    chown: changing ownership of `.recently-used.xbel': Operation not permitted
    Did you remember to put 'sudo' in front of the chown command?
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  10. #10
    Join Date
    Apr 2011
    Beans
    16

    Unhappy Re: launch deluge autoomatically using scheduled tasks

    yes... ofcourse i did...
    but still it shows the same messege

Page 1 of 2 12 LastLast

Tags for this Thread

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
  •