Configure crontab in Docker container (daocloud + Docker + larave5)

Recently, the project involves the function of a scheduled task, so I have studied the usage of crontab in recent days, and successfully opened this function on my computer according to the related online tutorials   Laravel + crontab Add crontab configuration 1. Execute command $ crontab -e   2. Add the following (path/to is the applicatio ...

Posted by lmhart on Wed, 25 Dec 2019 10:38:55 -0800

pm2 file configuration details

brief introduction PM2 is a process management of Node application with load balancing function! Built in load balancing (using Node cluster cluster module) Can run in the background It can shut down and reload in 0 seconds. (it can be understood that there is no need to shut down and restart, and we have updated the program w ...

Posted by igor berger on Mon, 23 Dec 2019 09:59:10 -0800

laravel task scheduling actual database backup

We need to back up the database once a minute. Let's start. Create command file php artisan make:comman BackupDatabase Open the file you just created and change it to the following: <?php namespace App\Console\Commands; use Illuminate\Console\Command; use Symfony\Component\Process\Exception\ProcessFailedException; use Symfony\Component\Pro ...

Posted by dugindog on Mon, 02 Dec 2019 08:20:44 -0800

Automatically clean up elasticsearch index on a regular basis

Catalog 1.1 how to view index 1.2 manual index deletion method 1.3 script cleanup index 1.4 scheduled tasks 1.1 how to view index Explain: 01: I have installed elasticsearch, kibana and logstash on one machine 02:192.168.10.138 is the intranet IP address monitored by elasticsearch 03:9200 is one of the ports of elasticsearch #How to view ind ...

Posted by Dan400007 on Sun, 01 Dec 2019 07:58:36 -0800

The implementation of crond for regular backup of CentOS 7.2 database (taking Kingbase 7 as an example)

When a project goes online, it often needs to back up the database regularly to deal with uncertain environment and unknown problems. It is arranged as follows: What is crond? crond and crontab are inseparable. Crontab is a command, common in Unix and Unix like operating systems, which is used to set periodically executed instructions. The co ...

Posted by jswash on Thu, 07 Nov 2019 19:56:55 -0800

Introduction to the use of Celery in Django

Celery introduction Cellery is a simple, flexible and reliable distributed system dealing with a large number of messages, and provides the necessary tools to maintain such a system. It is a task queue that focuses on real-time processing and supports task scheduling. What is task queue Task queue: a mechanism to distribute tasks between thread ...

Posted by seaten on Mon, 04 Nov 2019 20:40:47 -0800

docker container logrotate does not work

process A log analysis script is added to syslog docker. The script uses the shortest edit distance algorithm to collect error logs and send them to the test environment alarm group. The script relies on logrotate. The next morning, the expected error collection alarm is not seen. It is found that logrotate is not working. xxxxxxxx@xxxxxxxx:/sr ...

Posted by veluit06 on Sat, 19 Oct 2019 20:07:34 -0700

Get active nn and replace hue.ini

namenodelists="nnip1,nnip2" nn1=$(echo $namenodelists | cut -d "," -f 1) nn2=$(echo $namenodelists | cut -d "," -f 2) nn1state=$(curl "http://$nn1:50070/jmx?qry=Hadoop:service=NameNode,name=NameNodeStatus"|grep -c active) nn2state=$(curl "http://$nn2:50070/jmx?qry=Hadoop:service=NameNode,name=NameNodeStatus"|grep -c active) source /etc ...

Posted by Padgoi on Sat, 19 Oct 2019 11:11:32 -0700

Data synchronization through rsycn

I. experimental requirements 1. The backup machine needs to synchronize all files under the / app/java_project directory of the MIS server at 1:03 a.m. every day. 2. It is required to record the synchronization log to facilitate the analysis of synchronization failure. II. Task analysis 1. Use crontab to write scheduled tasks 2. Use rsync for r ...

Posted by wattsup88 on Sat, 19 Oct 2019 07:47:51 -0700

Xtrabackup backup script

Install MySQL mysql-5.7 (yum mode) curl -sSL https://dwz.cn/gfcnHqGS -o install-mysql.sh chmod +x install-mysql.sh ./install-mysql.sh --get-version # View software versions in the repository # Example ./install-mysql.sh --active install --data-dir /home/hadoop/mysql --version 5.7.23 --root-pass 123abc@DEF --help # View Help Inform ...

Posted by jtbaker on Sun, 06 Oct 2019 01:57:33 -0700