iam using whenever gem to execute a rake task, in my rails application. in development environment everything is working fine this is the following code.
set :environment, "development"
set :output, {:error => "log/cron_error_log.log", :standard => "log/cron_log.log"}
every :day, :at => '12:10pm' do
runner "Employee.assign_shift_policies"
end
and in terminal to create a crontab and to run that cron tab file by using whenever gem iam running the following commands.
whenever
whenever -w
and the tasks are executing correctly. and the output of these rake tasks is appending to the following log files properly.
log/cron_error_log.log
log/cron_log.log
in development everthing is working fine. how to run these background jobs in amazon aws beanstalk server, means how to execute these whenever and whenever -w commands in amazon aws server to generate crontab and to execute those jobs in aws server by using elastic beanstalk?
Aucun commentaire:
Enregistrer un commentaire