当前位置:网站首页>Larave 数据库备份 定时任务
Larave 数据库备份 定时任务
2022-06-22 03:42:00 【.海上月】
手册参考:任务调度 | 继续深入 |《Laravel 9 中文文档 9.x》| Laravel China 社区 (learnku.com)
参考博客 laravel 8 通过 任务调度 实现 数据库备份 | Laravel China 社区 (learnku.com)
这里博客里面编写的定时任务为2:00 自动备份 为了演示效果 可以
在 App\Console\Kernel 写代码
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')->hourly();
//每分钟发生执行一次备份命令
$schedule->command('backup:run --disable-notifications')->everyMinute();
}
这是laravel 提供的相关频次函数

如果执行命令,zip为空文件夹 使用命令查看本机电脑mysql环境变量是否配置 mysqldump
如果不为,则配置本机mysql,系统变量
电脑重启,执行项目work命令
边栏推荐
猜你喜欢

Flutter performance optimization

详细专业的软件功能测试报告应该怎样书写

系统漏洞利用与提权

未来已来:云原生时代

Pan micro e-cology V9 information disclosure vulnerability

八大排序之直接插入排序

IIR filter design basis and MATLAB design example

NLog自定义Target之MQTT

What are the differences between SVN and CVS

MySQL 45 lecture learning notes (II) execution of SQL update statements
随机推荐
Pointer and pointer of pointer
How to realize SVN efficient management
Wireshark packet analysis Wireshark 0051 pcap
二叉树的层次遍历
TwinCAT 3 RS232通信的关键程序
Join等待多个线程的同步结果
MySQL 45 lecture notes (I) execution of an SQL statement
Flutter 颜色渐变及模仿淘宝渐变关注按钮
Introduction to Beifu TwinCAT NC PTP
3DE position of moving object
ORA-32700: error occurred in DIAG Group Service
Fatal NI connect error 12170. Error reporting processing
Threejs realizes the fluctuation hot spot effect, fluctuation mark and fluctuation label display
Cloud native architecture (03) - Architecture
倍福 PLC 字符串类型string操作
128 traps - source code analysis
A component required a bean of type 'com. example. demo3.service. UserServiceImp' that could not be fou
Sword finger offer 68 - ii Nearest common ancestor of binary tree
How to install laravel
128陷阱——源码分析