Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sangahco/pmis-common-script

Common scripts used on a PMIS server
https://github.com/sangahco/pmis-common-script

bash mysqldump rsync

Last synced: about 2 months ago
JSON representation

Common scripts used on a PMIS server

Awesome Lists containing this project

README

        

# PMIS Common Script

Some of this script can be added to crontab for scheduling the execution of those script,
daily or weekly.

Every user in the system has its own crontab scheduler,
so before continuing always check the current user,
and think if this user should run the script or maybe someone else,
than just type in console the following command:

$ crontab -e


At the top of the crontab file always put the following lines:

SHELL=/bin/bash
BASH_ENV=/home//.bashrc

Doing this we tell to crontab that the following scripts have to be run using the `bash` shell
and it should use the environment in `/home//.bashrc`.

Than add the scripts you want to schedule the run with these lines:

# daily schedule
00 02 * * * /home/oracle/script/dbbackup.sh

# weekly schedule (on sunday)
10 02 * * 0 /home/sangah/script/hub/docker-auto.sh restart