Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to start my torrent downloading at night after 11 PM so I need my computer to start automatically at 11 PM and then log in to an account and start a torrent program.

I know that I can start up my computer at a specific time in BIOS but the problem is automatically logging in the system. How can I do that?

share|improve this question
up vote 2 down vote accepted

I got what I needed by this Command

sudo /etc/init.d/ 23:00 && transmission-gtk

Where sleep_until is :


# Auto suspend and wake-up script
# Puts the computer on standby and automatically wakes it up at specified time
# Written by Romke van der Meulen <>
# Minor mods fossfreedom for AskUbuntu
# Takes a 24hour time HH:MM as its argument
# Example:
# suspend_until 9:30
# suspend_until 18:45

# ------------------------------------------------------
# Argument check
if [ $# -lt 1 ]; then
    echo "Usage: suspend_until HH:MM"

# Check whether specified time today or tomorrow
DESIRED=$((`date +%s -d "$1"`))
NOW=$((`date +%s`))
if [ $DESIRED -lt $NOW ]; then
    DESIRED=$((`date +%s -d "$1"` + 24*60*60))

# Kill rtcwake if already running
sudo killall rtcwake

# Set RTC wakeup time
# N.B. change "mem" for the suspend option
# find this by "man rtcwake"
sudo rtcwake -l -m mem -t $DESIRED &

# feedback
echo "Suspending..."

# give rtcwake some time to make its stuff
sleep 2

# then suspend
# N.B. dont usually require this bit
#sudo pm-suspend

# Any commands you want to launch after wakeup can be placed here
# Remember: sudo may have expired by now

# Wake up with monitor enabled N.B. change "on" for "off" if 
# you want the monitor to be disabled on wake
xset dpms force on

# and a fresh console
echo "Good morning!"
share|improve this answer

You don't need to log in to run a script at boot time, just add the path to your script in


If I were you I'd program it to wait at least 30 seconds

$ sleep 30

So your machine can setup the network, if the network doesn't work after boot time (you can check it by log in in a virtual console - Ctrl+Alt+F2, going back with Ctrl-Alt+F7 - and run

$ ping

You'll need to configure /etc/network/interfaces or use


In your script to configure NetworkManager

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.