GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - PowerShellWeb/Eventful: Easy Eventful PowerShell

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

823 Commits
823 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
Assets
Assets
 
 
EventSources
EventSources
 
 
Formatting
Formatting
 
 
GitHub/Jobs
GitHub/Jobs
 
 
Types
Types
 
 
docs
docs
 
 
en-us
en-us
 
 
CHANGELOG.md
CHANGELOG.md
 
 
Clear-EventSource.ps1
Clear-EventSource.ps1
 
 
Eventful.GithubWorkflow.psdevops.ps1
Eventful.GithubWorkflow.psdevops.ps1
 
 
Eventful.HelpOut.ps1
Eventful.HelpOut.ps1
 
 
Eventful.PSSVG.ps1
Eventful.PSSVG.ps1
 
 
Eventful.ezout.ps1
Eventful.ezout.ps1
 
 
Eventful.format.ps1xml
Eventful.format.ps1xml
 
 
Eventful.psd1
Eventful.psd1
 
 
Eventful.psm1
Eventful.psm1
 
 
Eventful.tests.ps1
Eventful.tests.ps1
 
 
Eventful.types.ps1xml
Eventful.types.ps1xml
 
 
Export-Event.ps1
Export-Event.ps1
 
 
Get-EventHandler.ps1
Get-EventHandler.ps1
 
 
Get-EventSource.ps1
Get-EventSource.ps1
 
 
Import-Event.ps1
Import-Event.ps1
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
Receive-Event.ps1
Receive-Event.ps1
 
 
Send-Event.ps1
Send-Event.ps1
 
 
Understanding_Event_Sources.md
Understanding_Event_Sources.md
 
 
Watch-Event.ps1
Watch-Event.ps1
 
 

Repository files navigation

Easy Eventful PowerShell

Getting Started with Eventful

Eventful is a PowerShell module that helps you script asynchronously.

It gives you an easy syntax to describe events handlers in PowerShell, and provides a platform to build custom event sources.

You can watch for events to occur with Watch-Event. Watch-Event is aliased to "On". For example:

# Run in a second
Watch-Event Delay "00:00:01" { "In A Second!" | Out-Host }

# Or, using the alias 'On'
on delay "00:05:00" { "Five more minutes!" | Out-Host}

These example use the built-in event source script 'Delay'.

Eventful gives you a way to write scripts that will produce events. These are event sources.

Eventful ships with several event sources. To see what event sources are available to you, run:

Get-EventSource  # See event sources

Each event source discovered when Eventful loads creates a smart alias that makes it easier to discover parameters, for example:

# Run in 30 seconds
On@Delay "00:00:30" { "This Message Will Self-Destruct in 30 seconds" | Out-Host }


# Run at 5:00 PM
On@Time "5:00 PM" { "End Of Day!" | Out-Host }

# Run every 2 minutes
On@Repeat "00:02:00" { "Every other minute" | Out-Host }

# Run whenever a file changes within the current directory
On@FileChange { "Files Changed:$($event.SenderEventArgs)" | Out-Host } 

Eventful also allows you to handle an arbitrary signal. In the example below, we set up a handler for "MySignal", and the use the alias send to Send-Event(s).

On MySignal {"Fire $($event.MessageData)!" | Out-Host }

# Send-Event can accept pipeline input for MessageData, and will not output unless -PassThru is specified.
1..3 | Send MySignal

Understanding Event Sources

About

Easy Eventful PowerShell

eventful.start-automating.com/

Resources

Readme
License
Activity
Custom properties

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.