public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Using date/time variables in cronjobs?
@ 2013-05-05 16:56 Tanstaafl
  2013-05-05 17:07 ` Mick
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Tanstaafl @ 2013-05-05 16:56 UTC (permalink / raw
  To: gentoo-user

Ok, another little thing...

Is there a simple way to use date/time variables in cronjobs? Or do I 
need to use a bash script for this? I prefer simple, and just using the 
variables directly in the cron command would be easier if it works, so 
figured I'd ask first...

I'm trying to schedule a dump of my databases like so:

pg_dumpall --username=username -o -f 
/home/user/mypg_backups/hourly/\%y/\%m/\%d/\%t.sql.gz

But trying to run this command fails with:

pg_dumpall: could not open the output file 
"/home/user/mypg_backups/hourly/%y/%m/%d/%t.sql.gz": No such file or 
directory

Tried escaping the variables and not, same error...


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-05-11 16:52 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-05 16:56 [gentoo-user] Using date/time variables in cronjobs? Tanstaafl
2013-05-05 17:07 ` Mick
2013-05-05 17:32   ` Tanstaafl
2013-05-05 17:49 ` Alan McKinnon
2013-05-05 18:07 ` Tanstaafl
2013-05-05 18:18   ` Neil Bothwick
2013-05-05 18:31   ` Tanstaafl
2013-05-05 20:06     ` Todd Goodman
2013-05-05 21:25       ` Neil Bothwick
2013-05-05 21:56         ` Tanstaafl
2013-05-05 23:21           ` Tanstaafl
2013-05-06  0:09             ` Volker Armin Hemmann
2013-05-06  9:48             ` Neil Bothwick
2013-05-06  3:25           ` Pandu Poluan
2013-05-11 16:51             ` SOLVED - WAS " Tanstaafl
2013-05-05 20:17     ` Alan McKinnon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox