Skip to content

Instantly share code, notes, and snippets.

@cwbeck
Created Apr 20, 2017
Embed
What would you like to do?
/*
# This is present in the config file... (Play 2.5.14)
# cron.schedule = [
# {
# job_class_name = "cron.Bootstrap"
# every = "once"
# },
# {
# job_class_name = "cron.PushToFirehose"
# every = "minute"
# },
# {
# job_class_name = "cron.SyncS3ToGCS"
# every = "15-minutes"
# },
# ...
# }
*/
val schedule: List[mutable.HashMap[String, String]] = configuration
.getConfigList("cron.schedule")
.get
.asScala
.map(c => {
mutable.HashMap[String, String](
"job_class_name" -> c.getString("job_class_name").get,
"every" -> c.getString("every").get
)
})
.toList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment