 |
03-03-2008, 02:37 PM
|
#1 (permalink)
|
|
Alpha Geek
Join Date: Jan 2006
Posts: 543
|
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.
|
|
|
|
Advertisements. Register and be a member of the community to get rid of them.
|
|
Advertisement
|
|
03-03-2008, 02:57 PM
|
#2 (permalink)
|
|
String Phreak
Join Date: Mar 2005
Location: In ur Evil Mind!
Posts: 2,457
|
Re: Free time scheduling in Ubuntu
May be a shell script?
__________________
Bad Bad server.....No candy for u!
|
|
|
03-03-2008, 02:59 PM
|
#3 (permalink)
|
|
Proud to be Linux
Join Date: Jun 2006
Posts: 458
|
Re: Free time scheduling in Ubuntu
try gnome-sheduler in the repos.it uses cron
__________________
http://abhinandh.com
|
|
|
03-03-2008, 03:12 PM
|
#4 (permalink)
|
|
Married!
Join Date: Apr 2007
Location: Calcutta
Posts: 1,524
|
Re: Free time scheduling in Ubuntu
^^ gnome-schedule
__________________
|| GNU/Linux User || PCLOS KDE 4.6 || 17" DELL Studio ||
topdocumentaryfilms.com
|
|
|
03-03-2008, 03:22 PM
|
#5 (permalink)
|
|
Alpha Geek
Join Date: Jan 2006
Posts: 543
|
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??
|
|
|
03-03-2008, 03:40 PM
|
#6 (permalink)
|
|
Married!
Join Date: Apr 2007
Location: Calcutta
Posts: 1,524
|
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.
|
|
|
03-03-2008, 03:52 PM
|
#7 (permalink)
|
|
Alpha Geek
Join Date: Jan 2006
Posts: 543
|
Re: Free time scheduling in Ubuntu
The link mentioned, gives the procedure for installing gnome-schedule. I have already done that.
|
|
|
03-03-2008, 03:55 PM
|
#8 (permalink)
|
|
Married!
Join Date: Apr 2007
Location: Calcutta
Posts: 1,524
|
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
|
|
|
03-03-2008, 03:58 PM
|
#9 (permalink)
|
|
Think Zen.
Join Date: Dec 2005
Posts: 1,498
|
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
|
|
|
03-03-2008, 04:07 PM
|
#10 (permalink)
|
|
18 Till I Die............
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
|
Re: Free time scheduling in Ubuntu
Quote:
Originally Posted by rahimveron
Found this HOW TO: Gnome-Schedule
BTW i am getting this error
Code:
no crontab for rahim
while scheduling anything.
|
what does the command
return. Does it return the same?
__________________
http://www.bash.org/?258908
|
|
|
03-03-2008, 04:11 PM
|
#11 (permalink)
|
|
Married!
Join Date: Apr 2007
Location: Calcutta
Posts: 1,524
|
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
|
|
|
03-03-2008, 04:21 PM
|
#12 (permalink)
|
|
18 Till I Die............
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
|
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
|
|
|
03-03-2008, 04:24 PM
|
#13 (permalink)
|
|
Married!
Join Date: Apr 2007
Location: Calcutta
Posts: 1,524
|
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
|
|
|
03-03-2008, 04:25 PM
|
#14 (permalink)
|
|
Think Zen.
Join Date: Dec 2005
Posts: 1,498
|
Re: Free time scheduling in Ubuntu
Quote:
Originally Posted by mehulved
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
|
|
|
03-03-2008, 04:42 PM
|
#15 (permalink)
|
|
GaurishSharma.com
Join Date: May 2005
Location: Jaipur
Posts: 4,116
|
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
|
|
|
03-03-2008, 04:46 PM
|
#16 (permalink)
|
|
Think Zen.
Join Date: Dec 2005
Posts: 1,498
|
Re: Free time scheduling in Ubuntu
Quote:
Originally Posted by gary4gar
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
|
|
|
03-03-2008, 04:51 PM
|
#17 (permalink)
|
|
Alpha Geek
Join Date: Jan 2006
Posts: 543
|
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.
|
|
|
03-03-2008, 05:00 PM
|
#18 (permalink)
|
|
18 Till I Die............
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
|
Re: Free time scheduling in Ubuntu
scripts? You mean shell scripts?
__________________
http://www.bash.org/?258908
|
|
|
03-03-2008, 05:05 PM
|
#19 (permalink)
|
|
Alpha Geek
Join Date: Jan 2006
Posts: 543
|
Re: Free time scheduling in Ubuntu
^^ well i guess so, told u am a noob as far as linux is concerned...
|
|
|
03-03-2008, 05:09 PM
|
#20 (permalink)
|
|
left this forum longback
Join Date: Sep 2005
Location: -
Posts: 7,536
|
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
|
|
|
03-03-2008, 06:10 PM
|
#21 (permalink)
|
|
Alpha Geek
Join Date: Jan 2006
Posts: 543
|
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..
|
|
|
03-03-2008, 06:15 PM
|
#22 (permalink)
|
|
left this forum longback
Join Date: Sep 2005
Location: -
Posts: 7,536
|
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
|
|
|
03-03-2008, 06:45 PM
|
#23 (permalink)
|
|
Married!
Join Date: Apr 2007
Location: Calcutta
Posts: 1,524
|
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.
|
|
|
21-03-2008, 12:36 PM
|
#24 (permalink)
|
|
Cool and Calm
Join Date: Jul 2006
Location: Bangalore
Posts: 406
|
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:
|
|
|
21-03-2008, 04:30 PM
|
#25 (permalink)
|
|
Proud to be Linux
Join Date: Jun 2006
Posts: 458
|
Re: Free time scheduling in Ubuntu
Quote:
Originally Posted by abhi_10_20
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
|
|
|
21-03-2008, 06:32 PM
|
#26 (permalink)
|
|
18 Till I Die............
Join Date: Jul 2004
Location: India, Mumbai, Marine Lines
Posts: 5,792
|
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
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
|
|
|
21-03-2008, 07:24 PM
|
#27 (permalink)
|
|
Cool and Calm
Join Date: Jul 2006
Location: Bangalore
Posts: 406
|
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:
|
|
|
25-04-2008, 11:55 PM
|
#28 (permalink)
|
|
In The Zone
Join Date: Jul 2006
Location: Cochin
Posts: 340
|
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/
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|