<commit_before>from . import runPowershell


def configureScheduledTask(hostname,folder,name,command,arguments,workingDir,username,password,scheduledTaskTriggerArguments):
    runPowershell('''\
$ErrorActionPreference="Stop"
$s=New-PSSession -ComputerName %s

Invoke-Command -Session $s -ScriptBlock {
    $action = New-ScheduledTaskAction -Execute "%s" -Argument "%s" -WorkingDirectory "%s"
    $trigger = New-ScheduledTaskTrigger %s
    $settingsSet = New-ScheduledTaskSettingsSet -Compatibility Win8

    $task = Get-ScheduledTask -ErrorAction Ignore -TaskPath "%s" -TaskName "%s"
    If($task -ne $Null){
        $task.Actions = $action
        $task.Triggers = $trigger
        $task.Settings = $settingsSet
        Set-ScheduledTask -InputObject $task -User "%s" -Password "%s"
    }Else{
        Register-ScheduledTask -TaskPath "%s" -TaskName "%s" -User "%s" -Password "%s" -Action $action -Trigger $trigger -Settings $settingsSet
    }
}
'''%(hostname,
     command,arguments,workingDir,
     scheduledTaskTriggerArguments,
     folder,name,
     username,password,
     folder,name,username,password))<commit_msg>Adding enable and disable scheduled tasks functions<commit_after>from . import runPowershell


def configureScheduledTask(hostname,folder,name,command,arguments,workingDir,username,password,scheduledTaskTriggerArguments):
    runPowershell('''\
$ErrorActionPreference="Stop"
$s=New-PSSession -ComputerName %s

Invoke-Command -Session $s -ScriptBlock {
    $action = New-ScheduledTaskAction -Execute "%s" -Argument "%s" -WorkingDirectory "%s"
    $trigger = New-ScheduledTaskTrigger %s
    $settingsSet = New-ScheduledTaskSettingsSet -Compatibility Win8

    $task = Get-ScheduledTask -ErrorAction Ignore -TaskPath "%s" -TaskName "%s"
    If($task -ne $Null){
        $task.Actions = $action
        $task.Triggers = $trigger
        $task.Settings = $settingsSet
        Set-ScheduledTask -InputObject $task -User "%s" -Password "%s"
    }Else{
        Register-ScheduledTask -TaskPath "%s" -TaskName "%s" -User "%s" -Password "%s" -Action $action -Trigger $trigger -Settings $settingsSet
    }
}
'''%(hostname,
     command,arguments,workingDir,
     scheduledTaskTriggerArguments,
     folder,name,
     username,password,
     folder,name,username,password))


def enableScheduledTask(hostname,folder,name):
    runPowershell('''\
$ErrorActionPreference="Stop"
$s=New-PSSession -ComputerName %s

Invoke-Command -Session $s -ScriptBlock {
    Enable-ScheduledTask -ErrorAction Ignore -TaskPath "%s" -TaskName "%s"
}
'''%(hostname,folder,name))


def disableScheduledTask(hostname,folder,name):
    runPowershell('''\
$ErrorActionPreference="Stop"
$s=New-PSSession -ComputerName %s

Invoke-Command -Session $s -ScriptBlock {
    Disable-ScheduledTask -ErrorAction Ignore -TaskPath "%s" -TaskName "%s"
}
'''%(hostname,folder,name))
{'fraction_non_alphanumeric': 0.1317449194113525, 'fraction_numerical': 0.000700770847932726, 'mean_word_length': 4.376647834274953, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5881861', 'n_tokens_mistral': 885, 'n_tokens_neox': 866, 'n_words': 193}