Skip to content

Commit f13dbb3

Browse files
committed
add support whenever
1 parent 3c6e718 commit f13dbb3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

lib/mina/whenever.rb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
namespace :whenever do
2+
desc "Clear crontab"
3+
task :clear do
4+
queue %{
5+
echo "-----> Clear crontab for #{domain}"
6+
#{echo_cmd %[cd #{deploy_to!}/#{current_path!} ; bundle exec whenever --clear-crontab #{domain} --set 'environment=production&path=#{deploy_to!}/#{current_path!}']}
7+
}
8+
end
9+
desc "Update crontab"
10+
task :update do
11+
queue %{
12+
echo "-----> Update crontab for #{domain}"
13+
#{echo_cmd %[cd #{deploy_to!}/#{current_path!} ; bundle exec whenever --update-crontab #{domain} --set 'environment=production&path=#{deploy_to!}/#{current_path!}']}
14+
}
15+
end
16+
desc "Write crontab"
17+
task :write do
18+
queue %{
19+
echo "-----> Update crontab for #{domain}"
20+
#{echo_cmd %[cd #{deploy_to!}/#{current_path!} ; bundle exec whenever --write-crontab #{domain} --set 'environment=production&path=#{deploy_to!}/#{current_path!}']}
21+
}
22+
end
23+
end

0 commit comments

Comments
 (0)