Skip to content

Instantly share code, notes, and snippets.

@cwbeck
Created April 20, 2017 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cwbeck/af1c875648fc5958432c01b3ddbd4661 to your computer and use it in GitHub Desktop.
Save cwbeck/af1c875648fc5958432c01b3ddbd4661 to your computer and use it in GitHub Desktop.
/*
# 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