Created
August 2, 2018 06:01
-
-
Save msroot/b8bbf053de3d4cede8ffe1f750ebcaf2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'clockwork' | |
#View clockwork's jobs | |
Clockwork.manager.instance_variable_get("@events").map { |job| | |
a = [:hour, :min, :wday].map { |e| | |
if job.instance_variable_get("@at").try(e) | |
"#{e}: #{job.instance_variable_get("@at").send(e)}" | |
end | |
}.join(" ") | |
[job.to_s, a] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment