I don' t think the Jenkins CRON spec has seconds resolution.
You can build an orchestrater job that is scheduled to run every 1 minute.
Then in that job, loop 6 times with a sleep of 10 seconds and build another job.
Also use the do not allow concurrent builds.
Something like this:
pipeline {
agent any
options {
disableConcurrentBuilds()
timestamps()
}
triggers {
// Default triggering on a schedule every 1 minute or you can get from ENV
cron("${env.CRON_SCHEDULE?:'* * * * *'}")
}
stages {
stage('Trigger Job Every 10s') {
steps {
script {
for(int i = 0;i < 6;i++) {
build job:'foo', wait: false
sleep 10
}
}
}
}
}
}
Have fun!
--Bill