Cron: job starts but doesn't complete

Posted by Guandalino on Ask Ubuntu See other posts from Ask Ubuntu or by Guandalino
Published on 2012-06-22T15:17:51Z Indexed on 2012/06/22 15:25 UTC
Read the original article Hit count: 336

Filed under:
|

I have a problem with a cron job which starts but doesn't complete. Running the command manually works fine. I already read the page about cron issues and solutions here on AskUbuntu, tried the proposed solutions but didn't find an answer working in my case.

I'm using Ubuntu 12.04.

$ crontab -e

SHELL=/bin/bash # otherwise it would be /bin/sh
59 16 * * * /bin/duply calendar backup > /tmp/duply.log

Btw, the cron file ends with an empty line, as someone pointed out.

Once the job has "finished"...:

$ cat /tmp/duply.log 
Start duply v1.5.7, time is 2012-06-22 16:59:01.

Instead, running manually the script it works correctly and gives this output:

Start duply v1.5.7, time is 2012-06-22 17:06:39.

[cut]
... here is a long output generated by duply.
... and yes, files have been backed up.
[cut]

--- Finished state OK at 17:06:42.581 - Runtime 00:00:03.170 ---

I also tried to restart the cron daemon (sudo service cron restart) but nothing changed.

Do you have any suggestion to fix the issue?

© Ask Ubuntu or respective owner

Related posts about 12.04

Related posts about cron