更新时间:2023-12-05 14:00:10
I haven't tested it myself, but looking at the API it should be possible in the following way:
import hudson.model.*
def q = Jenkins.instance.queue
q.items.findAll { it.task.name.startsWith('my') }.each { q.cancel(it.task) }
相关API链接: