Closed GoogleCodeExporter closed 9 years ago
Errr..forgot to mention that I have a USB drive mounted on /mnt. This is my
entire cron job code block:
* * * * * root /mnt/wrtbwmon setup br0
*/15 0-3 * * * root /mnt/wrtbwmon update /mnt/usage.db peak
*/15 4-12 * * * root /mnt/wrtbwmon update /mnt/usage.db offpeak
*/15 13-23 * * * root /mnt/wrtbwmon update /mnt/usage.db peak
*/15 * * * * root /mnt/wrtbwmon publish /mnt/usage.db /tmp/www/usage.htm
*/15 * * * * root /mnt/wrtbwmon publish /mnt/usage.db /mnt/usage.htm
55 23 * * * root /mnt/wrtbwmon publish /mnt/usage.db /mnt/usage-`date
+%d%b%Y`.htm
5 0 * * * root rm /mnt/usage.db
Original comment by AegisDrgn@gmail.com
on 23 Jun 2010 at 7:55
I am almost certain the `date +%d%b%Y` part in a cron command will not work.
As a workaround, I would create a script with this content :
#!/bin/sh
/mnt/wrtbwmon publish /mnt/usage.db /mnt/usage-`date +%d%b%Y`.htm
and calling it as the crom command, ie.
55 23 * * * root /mnt/generate_daily_report.sh
Original comment by emmanuel...@gmail.com
on 23 Jun 2010 at 8:31
It worked! Thanks a bunch Emmanuel!
Original comment by AegisDrgn@gmail.com
on 24 Jun 2010 at 1:42
Closing issue
Original comment by emmanuel...@gmail.com
on 3 Jul 2010 at 6:52
Original issue reported on code.google.com by
AegisDrgn@gmail.com
on 23 Jun 2010 at 7:52