
Hello,
How to automate SVN update ?
In crontab im adding this:
#svn update 5 5 * * * root "cd /opt/observium/;svn update >> /dev/null 2>&1"
#after svn upadte 5 9 * * * root /opt/observium/discovery.php -u >> /dev/null 2>&1
but seems like first line doesn't work.
Any help?

First order of business, remove pointing the errors to /dev/null and see what it actually says?
I highly recommend NOT redirecting stderr to /dev/null anyway - you want to see when something goes wrong. You of course do not want to see the standard output with the file update, so indeed redirecting that to /dev/null is fine.
Second order of business, make a shellscript that executes commands in order, instead of guessing how many minutes have passed before running discovery -u. Either you run 4 minutes on a possibly wrong database or rrd schema, or you're too fast and run discovery when svn is still running.
Tom
On 12/11/2017 07:46, Edvinas K wrote:
Hello,
How to automate SVN update ?
In crontab im adding this:
#svn update 5 5 * * * root "cd /opt/observium/;svn update >> /dev/null 2>&1"
#after svn upadte 5 9 * * * root /opt/observium/discovery.php -u >> /dev/null 2>&1
but seems like first line doesn't work.
Any help?
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium

Hi,
I just the following to update every 6 hours but change accordingly
MAILTO=“simon@xxxxx.com" 1 */6 * * * root date && svn update /opt/observium && /opt/observium/discovery.php -u && date
Regards
Simon
On 12 Nov 2017, at 06:46, Edvinas K edvinas.email@gmail.com wrote:
Hello,
How to automate SVN update ?
In crontab im adding this:
#svn update 5 5 * * * root "cd /opt/observium/;svn update >> /dev/null 2>&1"
#after svn upadte 5 9 * * * root /opt/observium/discovery.php -u >> /dev/null 2>&1
but seems like first line doesn't work.
Any help?
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium

Thank you, Tom for valuable info and Simon for solution.
On Sun, Nov 12, 2017 at 1:41 PM, Simon Mousey Smith < simonsmith5521@gmail.com> wrote:
Hi,
I just the following to update every 6 hours but change accordingly
MAILTO=“simon@xxxxx.com" 1 */6 * * * root date && svn update /opt/observium && /opt/observium/discovery.php -u && date
Regards
Simon
On 12 Nov 2017, at 06:46, Edvinas K edvinas.email@gmail.com wrote:
Hello,
How to automate SVN update ?
In crontab im adding this:
#svn update 5 5 * * * root "cd /opt/observium/;svn update >> /dev/null 2>&1"
#after svn upadte 5 9 * * * root /opt/observium/discovery.php -u >> /dev/null 2>&1
but seems like first line doesn't work.
Any help?
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
participants (3)
-
Edvinas K
-
Simon Mousey Smith
-
Tom Laermans