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 have a backup script (rsync via ssh) which is run by cron (configured in /etc/crontab)

0 2   * * *   root    /bin/bash --login /opt/aebackup/

If I run it as logged in root like following it runs prefectly fine.

root@server:~# /opt/aebackup/

If I run it via cron it would just stop after a while (not always on the same task in the script.. it seems pretty random, like the process is killed at some point randomly)

Does anyone have an idea why my cron would do that? thanks for anything... I'm desperate!

share|improve this question
i just found out something really weired.. doesn't make any sense to me. when i use following in crontab it works as expected and solves my problem: 0 2 * * * root /bin/bash --login /opt/aebackup/ >> /whereever/sshbackup.log – brickinthewall Jun 22 '11 at 15:20

There was a bug in the old cron, for explanation see this launchpad entry.

share|improve this answer

If you are not interested to an output you can just appen to your command >/dev/null 2>&1... this way it becomes

 0 2   * * *   root    /bin/bash --login /opt/aebackup/ > /dev/null 2>&1

It should work fine this way, even if it's only a workaround for the bug.

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.