当前位置:网站首页>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命令
边栏推荐
猜你喜欢

快速掌握 ASP.NET 身份认证框架 Identity - 用户注册

The future has come: cloud primary Era

【牛客刷题-SQL大厂面试真题】NO1.某音短视频

Introduction to Beifu TwinCAT NC PTP

其实很多人都在学电子

Beifu twincat3 ads error query list

3DE recover from design

Flutter-Stream使用

Quickly master asp Net authentication framework identity - user registration

The following assertion was thrown during performlayout
随机推荐
Fluentd语法配置
所有项目的资源
平衡二叉树——调整变换规则
Dart异步是怎么实现
倍福TwinCAT3控制器和控制器间的Ads通讯
力扣:用两个栈实现一个队列
Interviewer: do you know the life cycle of flutter?
1299. replace each element with the largest element on the right
svn高效管理怎么实现
IIR filter design basis and MATLAB design example
Use of shutter stream
Es next new features
八大排序之直接插入排序
Fluent rendering Principle & detailed explanation of three trees
Join等待多个线程的同步结果
基于SSM的博客系统【带后台管理】
The future has come: cloud primary Era
【BP回归预测】基于matlab GA优化BP回归预测(含优化前的对比)【含Matlab源码 1901期】
Hierarchical traversal of binary tree
倍福TwinCAT设置PLC的扫描周期,运行周期方法