I wan't to change the repeat time from one task from 5 minutes to 1 minute. The task is there:
Folder: \
HostName: ZSERVER
TaskName: \Check_IIS_Server
Next Run Time: 04.10.2012 16:30:45
Status: Ready
Logon Mode: Interactive/Background
Last Run Time: 04.10.2012 16:25:45
Last Result: 0
Author: WACKER\createuser
Task To Run: powershell.exe powershell.exe -Noninteract
ive -Command "&{C:\Logfiles_Poly\Check_IIS_Server.ps1}"
Start In: N/A
Comment: N/A
Scheduled Task State: Enabled
Idle Time: Disabled
Power Management: Stop On Battery Mode, No Start On Batteries
Run As User: WACKER\Adminuser
Delete Task If Not Rescheduled: Enabled
Stop Task If Runs X Hours and X Mins: 01:00:00
Schedule: Scheduling data is not available in this format.
Schedule Type: Daily
Start Time: N/A
Start Date: N/A
End Date: N/A
Days: Every 1 day(s)
Months: N/A
Repeat: Every: 0 Hour(s), 5 Minute(s)
Repeat: Until: Time: None
Repeat: Until: Duration: 24 Hour(s), 0 Minute(s)
Repeat: Stop If Still Running: Disabled
Now my change command is, i wan't to edit the repeat time to one minute:
C:\Users\username>schtasks /change /tn "Check_IIS_Server_Poly" /ri 1
ERROR: The parameter is incorrect.
Why did I can't edit this job over command?
Thanks,
Horst
You need to provide full path to the task, in your case it'll be \Check_IIS_Server. I don't see anything else that could be wrong here.
I create a task (schtasks /change /mo 1 /tn "Test") with repeat time one minute and edit the other settings manuell.
Horst
Related
The following cron expression:
0 3 1 5-5/3 *
“At 03:00 on day-of-month 1 in every 3rd month from May through May.”
Is not accepted by Github actions:
on:
schedule:
- cron: "0 3 1 5-5/3 *" ## Day 1, every 3rd month May-May
With the following output:
ERROR: String does not match the pattern of "^(((\d+,)+\d+|((\d+|\*)/\d+|((JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(-(JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?))|(\d+-\d+)|\d+|\*|((MON|TUE|WED|THU|FRI|SAT|SUN)(-(MON|TUE|WED|THU|FRI|SAT|SUN))?)) ?){5}$".yaml-schema: GitHub Workflow
How is it possible to run a cron starting 1st of May, every 3 months, until the next May?
Your cron expression probably does not what you expect. The part 5-5/3 restricts the execution times to May only. This results in a job that will be run at 03:00 on the first day of every May:
2022-05-01 03:00:00
2023-05-01 03:00:00
2024-05-01 03:00:00
The regex that GitHub is using to verify the cron expression (according to the error message in your question) does not allow defining a range and step at the same time. This might be a bug as such expressions would usually be valid.
To fix this, you could list all months in the cron expression directly like 0 3 1 5,8,11,2 * which results in the following schedule:
2022-05-01 03:00:00
2022-08-01 03:00:00
2022-11-01 03:00:00
2023-02-01 03:00:00
2023-05-01 03:00:00
2023-08-01 03:00:00
2023-11-01 03:00:00
2024-02-01 03:00:00
I'm trying to run a peak calling tool within a conda environment using snakemake.
The script looks as such (I only added the rows connect to the problem):
rule all:
input:
expand('{project}/{organism}/{mapper}/seacr/{pattern}.auc.threshold.bed', pattern = PATTERN, sample = IDS, organism = config['org'], project = config['project'], mapper = config['mapper']) # SEACR - run the peak calling
rule seacr_run:
input:
IP = '{project}/{organism}/{mapper}/seacr/IP_{PATTERN}.bedgraph',
IgG = '{project}/{organism}/{mapper}/seacr/IgG_{PATTERN}.bedgraph',
output:
bed1 = '{project}/{organism}/{mapper}/seacr/{PATTERN}.auc.threshold.bed',
shell:
'''
bash /fs/home/yeroslaviz/SEACR/SEACR_1.3.sh {input.IP} 0.01 non stringent {output.bed1}
'''
When running the -nps dryrun of the snamemake command I get the correct command printed to STDOUT
> snakemake -nps /fs/pool/pool-bcfngs/scripts/P193.ChipSeq.Snakemake -j 100
...
Building DAG of jobs...
Job counts:
count jobs
1 all
1 seacr_run
2
[Tue Mar 3 13:56:19 2020]
rule seacr_run:
input: P193/Mmu.GrCm38/bowtie2/seacr/IP_H3K4m3.bedgraph, P193/Mmu.GrCm38/bowtie2/seacr/IgG_H3K4m3.bedgraph
output: P193/Mmu.GrCm38/bowtie2/seacr/H3K4m3.auc.threshold.bed
jobid: 22
wildcards: project=P193, organism=Mmu.GrCm38, mapper=bowtie2, PATTERN=H3K4m3
bash /fs/home/yeroslaviz/SEACR/SEACR_1.3.sh P193/Mmu.GrCm38/bowtie2/seacr/IP_H3K4m3.bedgraph 0.01 non stringent P193/Mmu.GrCm38/bowtie2/seacr/H3K4m3.auc.threshold.bed
[Tue Mar 3 13:56:19 2020]
localrule all:
...
Job counts:
count jobs
1 all
1 seacr_run
2
This was a dry-run (flag -n). The order of jobs does not reflect the order of execution.
When running the command above in the command line the tool works without problems. But hwhen I try to run it within the snakemake workflow I get the following error:
Waiting at most 5 seconds for missing files.
MissingOutputException in line 67 of /fs/pool/pool-bcfngs/scripts/P193.ChipSeq.Snakemake:
Missing files after 5 seconds:
P193/Mmu.GrCm38/bowtie2/seacr/H3K4m3.auc.threshold.bed
This might be due to filesystem latency. If that is the case, consider to increase the wait time with --latency-wait.
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Can anyone explain what is happening?
Thanks
My cookbook requires the guest to restart after installing WMF5 on Windows Server 2012R2.
reboot 'Reboot Windows' do
action :nothing
end
chocolatey 'DotNet4.5.1' do
version '4.5.1.20140606'
action :install
end
chocolatey 'Powershell' do
version '5.0.10586.20161027'
action :install
options ({ '-ignore-package-exit-codes' => '' })
end
powershell_script 'Reboot if PowerShell v4' do
notifies :reboot_now, 'reboot[Reboot Windows]', :immediately
only_if { reboot_pending? }
end
When the reboot occurs, test kitchen will then exit out without attempting to converge again. I am also unable to see an exit code.
D [WinRM] Waiting for output...
D [WinRM] Processing output
- execute the ruby block track-path-Powershell
* powershell_script[Reboot if PowerShell v4] action run
- execute "C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Bypass -InputFormat None -File "C:/Users/vagrant/AppData/Local/Temp/chef-script20161212-936-452h54.ps1"
* reboot[Reboot Windows] action reboot_now[2016-12-12T15:44:04-05:00] WARN: Rebooting system immediately, requested by 'Reboot Windows'
Running handlers:
Running handlers complete
Chef Client finished, 54/140 resources updated in 02 minutes 46 seconds
[2016-12-12T15:44:04-05:00] WARN: Rebooting server at a recipe's request. Details: {:delay_mins=>0, :reason=>"Reboot by Chef", :timestamp=>2016-12-12 15:44:04 -0500, :requested_by=>"Reboot Windows"}
D [WinRM] Waiting for output...
D [WinRM] Processing output
D [WinRM] cleaning up command_id: 737D4041-AE48-4403-ADEC-840D31B1FE0E on shell_id B4370D6D-AE03-46E3-9823-EFB3EF2EA14C
$$$$$$ DL is deprecated, please use Fiddle
D Cleaning up local sandbox in C:/Users/lsmit648/AppData/Local/Temp/default-windows2012r2min-sandbox-20161212-12432-rf5u0f
Finished converging <default-windows2012r2min> (3m19.06s).
-----> Kitchen is finished. (3m58.02s)
Here is my .kitchen.yaml file
---
driver:
name: vagrant
provider: virtualbox
gui: false
box_check_update: true
vm_hostname: false
communicator: winrm
guest: windows
customize:
natdnshostresolver1: 'on'
natdnsproxy1: 'on'
usb: 'off'
reset_command: "exit 0"
username: 'vagrant'
password: 'vagrant'
winrm:
boot_timeout: 600
max_tries: 500
# https://github.com/chef/chef-dk/issues/1009#issuecomment-246875683
transport:
name: winrm
username: 'vagrant'
password: 'vagrant'
elevated: true
provisioner:
name: chef_zero
retry_on_exit_code:
- [35, 1]
max_retries: 5
wait_for_retry: 60
client_rb:
exit_status: :enabled
verifier:
name: inspec
platforms:
- name: windows2012.r2.min
transport:
port: 5985
os_type: windows
shell_type: powershell
driver:
box: windows2012.r2.min
box_url: <%= ENV['VAGRANT_BOX_REPOSITORY'] %>/windows2012.r2min.json
port: 5985
winrm:
guest_port: 5985
network:
- ['forwarded_port', {guest: 3389, host: 9561, id: 'rdp', auto_correct: true}]
- ['forwarded_port', {guest: 5985, host: 9571, id: 'winrm', auto_correct: true}]
suites:
- name: default
run_list:
- recipe[chocolatey::default]
- recipe[wmf_5]
- recipe[roles_features]
How can I capture the exit code that reboot is using in order to have kitchen attempt to converge again?
Figured out the problem.
The chef client that was being installed by default was 12.8.1
I needed to have a min version of 12.11 for the exit codes to be returned correctly
I've just moved servers and have overlap on crontabs running.
Both servers set to BST, but one sends me a log at
08:00 BST the other old one 09:00 BST
The crontab entry for both is
0 9 * * * /root/phpmaillog.sh > /dev/null 2>&1
Mystery?
So I'm basically attempting to write some simple code using promises and I'm having a bit of trouble understanding why this particular code works every other time.
Promise = require('bluebird')
mkdirp = Promise.promisify(require('mkdirp'))
rm = Promise.promisify(require('rimraf'))
console.log "Preparing build directory"
rm('build')
.then(mkdirp('build'))
This will complete successfully the first run, but the second will fail, and so on.
Here is the steps:
┌[adam#bigboi] [/dev/pts/5] [master ⚡]
└[~/Projects/bummyjab]> time coffee index.coffee ~/Dropbox/Articles/*.md
Preparing build directory
coffee index.coffee ~/Dropbox/Articles/*.md 0.25s user 0.02s system 100% cpu 0.267 total
┌[adam#bigboi] [/dev/pts/5] [master ⚡]
└[~/Projects/bummyjab]> stat build
File: ‘build’
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 804h/2052d Inode: 17172395 Links: 2
Access: (0775/drwxrwxr-x) Uid: ( 1000/ adam) Gid: ( 1000/ adam)
Access: 2015-06-25 22:07:49.061331341 -0400
Modify: 2015-06-25 22:07:49.061331341 -0400
Change: 2015-06-25 22:07:49.061331341 -0400
Birth: -
┌[adam#bigboi] [/dev/pts/5] [master ⚡]
└[~/Projects/bummyjab]> time coffee index.coffee ~/Dropbox/Articles/*.md
Preparing build directory
Unhandled rejection Error: EEXIST: file already exists, mkdir '/home/adam/Projects/bummyjab/build'
at Error (native)
coffee index.coffee ~/Dropbox/Articles/*.md 0.20s user 0.03s system 100% cpu 0.235 total
Unfortunately, my google skills for this haven't come up with a reason why this is happening.
Thanks
If you're trying to control the order so that mkdirp('build') happens only after rm('build') has completed, then you need to pass a function reference to .then() like this:
rm('build').then(function () {
return mkdirp('build');
});
Or, you could use .bind():
rm('build').then(mkdirp.bind(null, 'build'));
What you were doing is executing mkdirp() immediately and passing that return value to .then() which doesn't wait to execute it until the promise is resolved.