Name: chronos-client
Owner: SalesforceIQ
Description: Simple Scala client for communicating with Chronos
Created: 2016-07-29 20:14:03.0
Updated: 2016-07-29 20:14:04.0
Pushed: 2016-08-16 20:21:13.0
Homepage: null
Size: 39
Language: Scala
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is compiled for Scala 2.11. It was forked from Scala 2.10 from Guidewire/chronos-client.
How to use it
rt com.guidewire.tools.chronos.client.Connection
rt com.guidewire.tools.chronos.client.api.v2.{Jobs, Schedule, Job, Chronos}
rt org.joda.time.DateTime
efine Chronos Connection
icit val conn = com.guidewire.tools.chronos.client.Connection("infra-staging.salesforceiq.com", 10000, true)
elete Job
nos.scheduler.jobs.delete("job-name", ignoreIfMissing = true)
dd Schedule Job
json = """{ "entities" : ["Lead", "Opportunity"], "username" : "productglasses+mar@gmail.com", "password" : "marc0DTBG1kAk4If2KpsYPB27CmfTxDUl" }"""
sched = Schedule(5L, DateTime.now, new org.joda.time.Period(1, org.joda.time.PeriodType.days()))
nos.scheduler.jobs.addScheduled(
Jobs.scheduled(
name = s"job-name",
command = s"docker run tutum/curl /usr/bin/curl -i -XPOST https://polaris-scheduling-staging.sfiqplatform.com/api/job/datapullersnapshot/namespace/Salesforce/tenant/uber/execution -d '$json'",
schedule = sched
)