欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

crontab 加载 rvm 环境

程序员文章站 2022-07-14 14:11:43
...
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