Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
auto-tx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vamp
auto-tx
Commits
a5039946
Commit
a5039946
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Conceptual planning of automatic service / config updates.
Refers to
#13
parent
961c42c0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
AutoTx/Resources/README.md
+52
-0
52 additions, 0 deletions
AutoTx/Resources/README.md
with
52 additions
and
0 deletions
AutoTx/Resources/README.md
0 → 100644
+
52
−
0
View file @
a5039946
Service Installation Updates
============================
The service can automatically be updated by running the
`Update-AutoTxService.ps1`
script. It will check a remote location (configured in the script header) and do
the following tasks:
-
check for new service binaries and update the local ones if applicable
-
check for a new configuration file for this host and update the local one
-
try to restart the service if one of the previous tasks was done
Automatic Updates
-----------------
To automate the above, a
*scheduled task*
has to be created. This can easily be
done by using the following PowerShell commands:
```
powershell
# create a repetition interval
$TimeSpan
=
New-TimeSpan
-Minutes
1
# configure a JobTrigger for the task using the repetition interval from above, repeating forever
$JobTrigger
=
New-JobTrigger
`
-Once
`
-At
(
Get-Date
)
.
Date
`
-RepetitionInterval
$TimeSpan
`
-RepeatIndefinitely
# configure the JobOptions for the task (battery options should not be required on a fixed system,
# but doesn't hurt either)
$JobOptions
=
New-ScheduledJobOption
`
-RunElevated
`
-StartIfOnBattery
`
-ContinueIfGoingOnBattery
# set credentials for running the task (requires permission to start/stop the service
# and overwriting the configuration and binaries)
$Cred
=
Get-Credential
# register the job for execution
Register-ScheduledJob
`
-FilePath
C:\Tools\AutoTx\Update-AutoTxService.ps1
`
-Name
"Update-AutoTxService"
`
-ScheduledJobOption
$JobOptions
`
-Trigger
$JobTrigger
`
-Credential
$Cred
`
-Verbose
```
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment