Hot answers tagged

3

Maybe your crontab file now looks like: # My cronjobs: * 2 * * * /scripts/task1.sh * 4 * * * /scripts/task2.sh You have multiple options instead of hoping that scheduling two cron jobs far enough apart is sufficient that they won't overlap when one runs a bit longer than expected: 1. Simply schedule a single cron job that executes multiple scripts ...


1

You may want to switch to (or allow) ident auth, then create a local system user with that same name. Then you can just run that script as that user, and it will log you in to postgres with that same user. https://www.postgresql.org/docs/9.0/static/auth-methods.html https://www.postgresql.org/docs/9.0/static/auth-pg-hba-conf.html So something like this ...


1

Take a look at a similar post here: Postgresql: Scripting psql execution with password The overall accepted answer (which may or may not work for your version of Postgres) is to use the PGPASSWORD environment variable like so: PGPASSWORD=[your password] psql -Umyuser < myscript.sql EDIT: Seems as though you tried and this didn't work. Have you looked ...


1

The crontab(1) man page notes you can populate the crontab via stdin: The first form of this command is used to install a new crontab from some named file or standard input if the pseudo-filename ``-'' is given. So we can do this: $ cat cron.dev1.txt * * * * * /bin/script1 $ cat cron.dev2.txt * * * * * /bin/script2 $ cat cron.dev*.txt | ...


1

You should never run munin-cron with 'root' user. Try running this command: chown -R munin:munin /var/www/munin After this try running "munin-cron" back from the "munin" user.


1

cron runs under root user, make sure your root user has s3cmd configuration otherwise copy them for root user cp -i /home/ubuntu/.s3cfg /root/.s3cfg



Only top voted, non community-wiki answers of a minimum length are eligible