Skip to content
forked from proxb/PoshRSJob

Provides an alternative to PSjobs with greater performance and less overhead to run commands in the background, freeing up the console.

License

Notifications You must be signed in to change notification settings

Bosparan/PoshRSJob

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PoshRSJob

Provides an alternative to PSjobs with greater performance and less overhead to run commands in the background, freeing up the console.

    .EXAMPLE
        $Test = 'test'
        $Something = 1..10
        1..5|start-rsjob -Name {$_} -ScriptBlock {
            Param($Object) [pscustomobject]@{
                Result=($Object*2)
                Test=$Using:Test
                Something=$Using:Something
            }
        }            

        Id  Name                 State           HasMoreData  HasErrors    Command
        --  ----                 -----           -----------  ---------    -------
        76  1                    Completed       True         False        ...
        77  2                    Running         False        False        ...
        78  3                    Running         False        False        ...
        79  4                    Completed       False        False        ...
        80  5                    Completed       False        False        ...
        
        Get-RSjob | Receive-RSJob

        Result Test Something
        ------ ---- ---------
             2 test {1, 2, 3, 4...}
             4 test {1, 2, 3, 4...}
             6 test {1, 2, 3, 4...}
             8 test {1, 2, 3, 4...}
            10 test {1, 2, 3, 4...}
        
        Description
        -----------
        Shows an example of the $Using: variable being used in the scriptblock.

About

Provides an alternative to PSjobs with greater performance and less overhead to run commands in the background, freeing up the console.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 100.0%