You can also use an SSH key for authentication with jenkins-cli.jar (configure 
the key in the Jenkins user configuration), so if "environment" refers to 
non-technical reasons, that would be an option.

Then there's the REST API. POST to /safeRestart to perform that action. For 
authentication, use the API key of the user account in Jenkins instead of a 
password.

If you use the Groovy plugin, you could create a job that performs safeRestart 
in a System Groovy build step with 
'jenkins.model.Jenkins.instance.safeRestart()'. Schedule as you would any other 
job.

On 27.02.2014, at 11:18, AndyB <andy.bi...@gmail.com> wrote:

> Hi,
> 
> Could you tell me if it's possible to schedule a regular safe-restart of 
> Jenkins? I have the safe-restart plugin which works fine, but I'd like to 
> have Jenkins do a safe-restart over the weekend when it's generally idle. I 
> looked at the command line interface but I can't use that as it requires 
> either storing a password in a file or passing a password on the command 
> line, neither of which is doable in our environment. Is there a way to 
> schedule an automatic safe restart from within Jenkins? I guess the problem 
> is that if it's a job the restart will block 'til the job itself is 
> completed, causing a deadlock. Can anyone suggest a way to achieve this?
> 
> Thanks,
> Andy
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to