Gentoo Archives: gentoo-user

From: Tanstaafl <tanstaafl@×××××××××××.org>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Using 'time' command in crontab?
Date: Thu, 11 Jul 2013 11:16:56
Message-Id: 51DE9408.8040303@libertytrek.org
1 Hi all,
2
3 Ok, I want to use the time command in my crontab...
4
5 Working crontab entry:
6
7 > 58 6,11,16,21 * * * rsnapshot -c /etc/rsnapshot/myhost.conf sync; rsnapshot -c /etc/rsnapshot/myhost.conf hourly
8
9 Non-working (with time command added):
10
11 > 58 6,11,16,21 * * * time { rsnapshot -c /etc/rsnapshot/myhost.conf sync; rsnapshot -c /etc/rsnapshot/myhost.conf hourly }
12
13 Adding the time { } to the command results in the following error being
14 emailed:
15
16 /bin/sh: -c: line 1: syntax error: unexpected end of file
17
18 Obviously this is more proof of my lack of understanding bash, but
19 googling hasn't revealed a solution, so any help is appreciated...
20
21 Thanks

Replies

Subject Author
Re: [gentoo-user] Using 'time' command in crontab? Alan McKinnon <alan.mckinnon@×××××.com>