Forum     

Go Back   Digit Technology Discussion Forum > Software > Open Source
Register FAQ Calendar Mark Forums Read

Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems.


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 03-03-2008, 02:37 PM   #1 (permalink)
Alpha Geek
 
Join Date: Jan 2006
Posts: 543
Default Free time scheduling in Ubuntu


Lets get the facts straight. Linux noob in here.

Ok, now here is my query. I schedule downloads during the free time (2am to 8am) on my windows installation. Here is how it works. By 2:10am i get connected (using rasdial). By 2:11am, utorrent starts downloading. By 7:55am the pc is shutdown.

I want to do the something similar in Ubuntu. I connect by issuing pon dsl-provider. I have also installed deluge torrent client.

Guide me fellas on how to schedule my downloads in Ubuntu

This schedule thingy is the only fact thats preventing me from being on ubuntu full time.
cool_techie_tvm is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 03-03-2008, 02:57 PM   #2 (permalink)
String Phreak
 
mediator's Avatar
 
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,457
Default Re: Free time scheduling in Ubuntu

May be a shell script?
__________________
Bad Bad server.....No candy for u!
mediator is offline  
Old 03-03-2008, 02:59 PM   #3 (permalink)
Proud to be Linux
 
abhinandh's Avatar
 
Join Date: Jun 2006
Posts: 458
Default Re: Free time scheduling in Ubuntu

try gnome-sheduler in the repos.it uses cron
__________________
http://abhinandh.com
abhinandh is offline  
Old 03-03-2008, 03:12 PM   #4 (permalink)
Married!
 
Rahim's Avatar
 
Join Date: Apr 2007
Location: Calcutta
Posts: 1,524
Default Re: Free time scheduling in Ubuntu

^^ gnome-schedule
__________________
|| GNU/Linux User || PCLOS KDE 4.6 || 17" DELL Studio ||

topdocumentaryfilms.com
Rahim is offline  
Old 03-03-2008, 03:22 PM   #5 (permalink)
Alpha Geek
 
Join Date: Jan 2006
Posts: 543
Default Re: Free time scheduling in Ubuntu

Thanks guys. Ok i installed gnome-schedule. Now what? How do i set the connection to start at 2:10? How do i set deluge to start by 2:11am??
cool_techie_tvm is offline  
Old 03-03-2008, 03:40 PM   #6 (permalink)
Married!
 
Rahim's Avatar
 
Join Date: Apr 2007
Location: Calcutta
Posts: 1,524
Default Re: Free time scheduling in Ubuntu

BTW i am getting this error
Code:
no crontab for rahim
while scheduling anything.
__________________
|| GNU/Linux User || PCLOS KDE 4.6 || 17" DELL Studio ||

topdocumentaryfilms.com

Last edited by Rahim; 03-03-2008 at 04:04 PM.
Rahim is offline  
Old 03-03-2008, 03:52 PM   #7 (permalink)
Alpha Geek
 
Join Date: Jan 2006
Posts: 543
Default Re: Free time scheduling in Ubuntu

The link mentioned, gives the procedure for installing gnome-schedule. I have already done that.
cool_techie_tvm is offline  
Old 03-03-2008, 03:55 PM   #8 (permalink)
Married!
 
Rahim's Avatar
 
Join Date: Apr 2007
Location: Calcutta
Posts: 1,524
Default Re: Free time scheduling in Ubuntu

^as you can see from my post, we both are in the same boat.
Hope someone guide both of us.
__________________
|| GNU/Linux User || PCLOS KDE 4.6 || 17" DELL Studio ||

topdocumentaryfilms.com
Rahim is offline  
Old 03-03-2008, 03:58 PM   #9 (permalink)
Think Zen.
 
ray|raven's Avatar
 
Join Date: Dec 2005
Posts: 1,498
Default Re: Free time scheduling in Ubuntu

Check if you have cron running in the list of processes.
Also check this link, http://kevin.vanzonneveld.net/techbl...using_crontab/

Regards,
ray
__________________
Do what you will; but not because you must. -- Zen Quote
ray|raven is offline  
Old 03-03-2008, 04:07 PM   #10 (permalink)
18 Till I Die............
 
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
Default Re: Free time scheduling in Ubuntu

Quote:
Originally Posted by rahimveron View Post
Found thisHOW TO: Gnome-Schedule
BTW i am getting this error
Code:
no crontab for rahim
while scheduling anything.
what does the command
Code:
crontab -l
return. Does it return the same?
__________________
http://www.bash.org/?258908
mehulved is offline  
Old 03-03-2008, 04:11 PM   #11 (permalink)
Married!
 
Rahim's Avatar
 
Join Date: Apr 2007
Location: Calcutta
Posts: 1,524
Default Re: Free time scheduling in Ubuntu

I get that error using gnome-schedule through The Terminal.
BTW here is what i get of crontab
Code:
user@HOST:~$ crontab 
crontab: usage error: file name must be specified for replace
usage:  crontab [-u user] file
        crontab [-u user] { -e | -l | -r }
                (default operation is replace, per 1003.2)
        -e      (edit user's crontab)
        -l      (list user's crontab)
        -r      (delete user's crontab)
__________________
|| GNU/Linux User || PCLOS KDE 4.6 || 17" DELL Studio ||

topdocumentaryfilms.com
Rahim is offline  
Old 03-03-2008, 04:21 PM   #12 (permalink)
18 Till I Die............
 
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
Default Re: Free time scheduling in Ubuntu

So, your crontab is working. Just check gnome-schedule's settings, maybe since you seem to have compiled it. It's looking for crontab in the wrong place.
__________________
http://www.bash.org/?258908
mehulved is offline  
Old 03-03-2008, 04:24 PM   #13 (permalink)
Married!
 
Rahim's Avatar
 
Join Date: Apr 2007
Location: Calcutta
Posts: 1,524
Default Re: Free time scheduling in Ubuntu

^^ I installed it through the repo.
the Preferences option is greyed-out even when i start it with sudo.
__________________
|| GNU/Linux User || PCLOS KDE 4.6 || 17" DELL Studio ||

topdocumentaryfilms.com
Rahim is offline  
Old 03-03-2008, 04:25 PM   #14 (permalink)
Think Zen.
 
ray|raven's Avatar
 
Join Date: Dec 2005
Posts: 1,498
Default Re: Free time scheduling in Ubuntu

Quote:
Originally Posted by mehulved View Post
So, your crontab is working. Just check gnome-schedule's settings, maybe since you seem to have compiled it. It's looking for crontab in the wrong place.
AFAIK, Gnome-Schedule wont compile if it cant find crontab.
__________________
Do what you will; but not because you must. -- Zen Quote
ray|raven is offline  
Old 03-03-2008, 04:42 PM   #15 (permalink)
GaurishSharma.com
 
gary4gar's Avatar
 
Join Date: May 2005
Location: Jaipur
Posts: 4,116
Default Re: Free time scheduling in Ubuntu

its easy as pie, no need to install any extra packages, cron itself is very powerful.

my crontab looks like

Code:
# m h  dom mon dow   command
10 2 * * * cd /home/gaurish/scripts && sh router-reboot.sh | telnet
10 2 * * * DISPLAY=:0.0 /opt/azureus/azureus
13 2 * * * wget -ci /home/gaurish/dl-list.txt
50 7 * * * cd /home/gaurish/scripts && sh router-reboot.sh | telnet
Root's crontab
Code:
50 7 * * * /sbin/shutdown -h 0
gary4gar is offline  
Old 03-03-2008, 04:46 PM   #16 (permalink)
Think Zen.
 
ray|raven's Avatar
 
Join Date: Dec 2005
Posts: 1,498
Default Re: Free time scheduling in Ubuntu

Quote:
Originally Posted by gary4gar View Post
its easy as pie, no need to install any extra packages, cron itself is very powerful.

my crontab looks like

Code:
# m h  dom mon dow   command
10 2 * * * cd /home/gaurish/scripts && sh router-reboot.sh | telnet
10 2 * * * DISPLAY=:0.0 /opt/azureus/azureus
13 2 * * * wget -ci /home/gaurish/dl-list.txt
50 7 * * * cd /home/gaurish/scripts && sh router-reboot.sh | telnet
Root's crontab
Code:
50 7 * * * /sbin/shutdown -h 0
Thats why i gave them that link

Btw, why use cd? just give the link to the script.
__________________
Do what you will; but not because you must. -- Zen Quote
ray|raven is offline  
Old 03-03-2008, 04:51 PM   #17 (permalink)
Alpha Geek
 
Join Date: Jan 2006
Posts: 543
Default Re: Free time scheduling in Ubuntu

I understand from gary4gar's post that he has created scripts to automate the whole procedure. Am curious of these scripts. How to create custom scripts in ubuntu? If i can create them, then its easy to schedule them using crontab.
cool_techie_tvm is offline  
Old 03-03-2008, 05:00 PM   #18 (permalink)
18 Till I Die............
 
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
Default Re: Free time scheduling in Ubuntu

scripts? You mean shell scripts?
__________________
http://www.bash.org/?258908
mehulved is offline  
Old 03-03-2008, 05:05 PM   #19 (permalink)
Alpha Geek
 
Join Date: Jan 2006
Posts: 543
Default Re: Free time scheduling in Ubuntu

^^ well i guess so, told u am a noob as far as linux is concerned...
cool_techie_tvm is offline  
Old 03-03-2008, 05:09 PM   #20 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Default Re: Free time scheduling in Ubuntu

THIS post shows how!
http://www.thinkdigit.com/forum/show...4&postcount=97

I think u guys can browse tips and tricks in OSS Sticky thread
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Old 03-03-2008, 06:10 PM   #21 (permalink)
Alpha Geek
 
Join Date: Jan 2006
Posts: 543
Default Re: Free time scheduling in Ubuntu

Wohoo !! I succeeded in automating the whole process..i tested it and its working fine... here is my crontab

Code:
10 2 * * * pon dsl-provider  # BSNL Connect, 
11 2 * * * DISPLAY=:0.0 /usr/bin/deluge # Deluge, 
55 7 * * * poff dsl-provider # BSNL Disconnect,
Thanks to everyone, especially to prakash for pointing me to the right thread..
cool_techie_tvm is offline  
Old 03-03-2008, 06:15 PM   #22 (permalink)
left this forum longback
 
praka123's Avatar
 
Join Date: Sep 2005
Location: -
Posts: 7,536
Default Re: Free time scheduling in Ubuntu

^congrats
__________________
left this forum long back.Admin Can Delete this Account and posts Permanantly.Thank You
Get GNU/Linux - http://getgnulinux.org
praka123 is offline  
Old 03-03-2008, 06:45 PM   #23 (permalink)
Married!
 
Rahim's Avatar
 
Join Date: Apr 2007
Location: Calcutta
Posts: 1,524
Default Re: Free time scheduling in Ubuntu

Thanks praka bhai tusi great ho!!!
It was so easy( after getting the guidance here).
__________________
|| GNU/Linux User || PCLOS KDE 4.6 || 17" DELL Studio ||

topdocumentaryfilms.com

Last edited by Rahim; 04-03-2008 at 10:36 AM.
Rahim is offline  
Old 21-03-2008, 12:36 PM   #24 (permalink)
Cool and Calm
 
abhi_10_20's Avatar
 
Join Date: Jul 2006
Location: Bangalore
Posts: 406
Default Re: Free time scheduling in Ubuntu

bump

Could you help me out in doing all these with crontab:

1. hibernate(off)- 12:15 am
2. power on- 2 am
3. dsl on- 2 05 am
4. azureus on- 2 10 am
5. azureus close- 7 45 am
6. dsl off- 8 am
7. hibernate(off)- 8:05 am

can we automate all these?
__________________
When Roger's at play, opponents pray..!!!!! :twisted:
abhi_10_20 is offline  
Old 21-03-2008, 04:30 PM   #25 (permalink)
Proud to be Linux
 
abhinandh's Avatar
 
Join Date: Jun 2006
Posts: 458
Default Re: Free time scheduling in Ubuntu

Quote:
Originally Posted by abhi_10_20 View Post
bump
1. hibernate(off)- 12:15 am
2. power on- 2 am
those two need to be done from the BIOS.
search for scheduling featres in your BIOS if they exist.

Quote:
3. dsl on- 2 05 am
4. azureus on- 2 10 am
5. azureus close- 7 45 am
6. dsl off- 8 am
7. hibernate(off)- 8:05 am
they can be configured from gnome-schedule(install it from repos)
or you can do it through CLI as mentioned above in this thread.
__________________
http://abhinandh.com
abhinandh is offline  
Old 21-03-2008, 06:32 PM   #26 (permalink)
18 Till I Die............
 
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
Default Re: Free time scheduling in Ubuntu

You maybe able to use http://ubuntuforums.org/showthread.php?t=329902 for 1 and 7
for 3 to 6
Code:
crontab -e
It will open a file, it should look like this
Quote:
5 2 * * * pon dsl-provider
10 2 * * * env DISPLAY=:0. azureus
45 7 * * * killall -HUP azureus
0 8 * * * poff dsl-provider
I am assuming you use pon, poff for connection and disconnection
I don't have azureus or ubuntu so I don't know the path to azureus, it would be a better idea to give the whole path.
And reading the appropriate man pages would have provided you all these answers
Or a search on your favourite search engine.
Only thing I have no idea about is how to automatically wake up from hibernate.

Also, see http://ubuntuforums.org/showthread.php?t=313884 for query #2
__________________
http://www.bash.org/?258908

Last edited by mehulved; 21-03-2008 at 06:32 PM. Reason: Automerged Doublepost
mehulved is offline  
Old 21-03-2008, 07:24 PM   #27 (permalink)
Cool and Calm
 
abhi_10_20's Avatar
 
Join Date: Jul 2006
Location: Bangalore
Posts: 406
Default Re: Free time scheduling in Ubuntu

thanks.... from what i learnt, its impossible to auto power on using crontab...bcoz cron itself needs a manual system start to up and run. So....only thing left out is by the BIOS.... i explored there....but dint find any option like that... only had 'wake on lan' but my comp is not connected to any lan......any other ideas ?
__________________
When Roger's at play, opponents pray..!!!!! :twisted:
abhi_10_20 is offline  
Old 25-04-2008, 11:55 PM   #28 (permalink)
In The Zone
 
Vivek788's Avatar
 
Join Date: Jul 2006
Location: Cochin
Posts: 340
Default Re: Free time scheduling in Ubuntu

hey i use crontab..and shutdown at 7.58 but as long as modem remains on..they take that much time as extra and divide total usage by time..i lost abt 800mb this month..help
__________________
Viva Green Computing!!
http://www.vivtech.blogspot.com/
Vivek788 is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ubuntu 7.10 loading time is slow saurabh kakkar Open Source 6 31-01-2008 09:06 PM
Top 10 Free Time Wasting Sites on the Net Gigacore Chit-Chat 9 07-06-2007 01:29 PM
Comodo to Offer Top Real-time Scanner for Free anandk Technology News 4 13-04-2007 02:52 AM
Free antivirus trials..but for a longer time.Check it out! sidewinder Technology News 19 01-02-2006 11:43 PM
Scheduling time to start and end process. Charley QnA (read only) 16 13-09-2005 03:45 PM

 
Latest Threads
- by Charan
- by Charan
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 03:01 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2