Railsã®æ©è½ã使ã£ãå¦çãç°¡åã«crontabã«è¨å®ãããã©ã°ã¤ã³ãwheneverããããã¾ããDSLã«ãã£ã¦ãRubyã©ã¤ã¯ãªæ¸ãæ¹ã§crontabãè¨å®ã§ããã®ãç¹å¾´ã§ãã whenever mysqlã®ããã¯ã¢ãããå®æçã«è¡ãããã°ã©ã ã使ã£ã¦ããããå¦çãçµã¿è¾¼ãæ¹æ³ãç´¹ä»ãã¾ãã ã¾ããããå¦çãè¨è¿°ãã¾ãããã¡ã¤ã«åãlib/batch_backup.rbãã¨ãã¾ãã # coding: utf-8 class BatchBackup def self.execute backup_database end # ãã¼ã¿ãã¼ã¹ã®ããã¯ã¢ãã def self.backup_database env = Rails.env # ããã¯ã¢ãããã¡ã¤ã«ãæ ¼ç´ãããã©ã«ãï¼ä½ã£ã¦ããï¼ location = "~/backup/database/" password = mypa
{{#tags}}- {{label}}
{{/tags}}