crontab 加载 rvm 环境
程序员文章站
2022-07-14 14:03:11
...
0 2 * * * export PATH=/home/agideo/.rvm/gems/ree-1.8.7-2011.03/bin:/home/agideo/.rvm/gems/ree-1.8.7-2011.03@global/bin:/home/agideo/.rvm/rubies/ree-1.8.7-2011.03/bin:/home/agideo/.rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games MY_RUBY_HOME=/home/agideo/.rvm/rubies/ree-1.8.7-2011.03 GEM_HOME=/home/agideo/.rvm/gems/ree-1.8.7-2011.03 && cd /var/www/<prj_name> && /usr/local/bin/backup_mysql -u root -p <pwd> -d <db_nam> -z /dev/null 2>&1
上一篇: Curl 常用命令