Is it possible to schedule a receive location to run once a week? I can only see to start it between certain dates and at certain times. Seems weird there is no way to run it at 10:00 on Fridays.
Am I missing an option here or is that just not possible? would the only possible way be to use the pollingstatement and do a query that results in 1 if the date is Friday?
you can try use this scheduled-task-adpater like this scheduled-task-adpater
or
if you like more complex way you can try to do somthing with the sdk
In the SDK directory of your BizTalk installation there is a script called EnableRecLoc.vbs
i prefer the first method
Related
I have multiple tasks that need to be scheduled during the last full workweek (Monday through Friday) of every month. These will be scheduled from a Windows Server 2016 server. I cannot figure out the logic to do it.
Additional info to help:
July 2020 is a perfect month to just say run on the last Monday/Tuesday/etc. Most months will not end with a full workweek though. It may end on a Tuesday and the full workweek ended 4 days before that.
I have ideas of how to do this, but they are not fully formulated:
Find the last Friday of the month and start 4 days before that.
Find the last Monday with at least 4 additional days in the month after.
If the last day of the month is Sunday, start 6 days before that; Saturday, start 5 days before that; etc.
What is the cleanest method to do this in task scheduler? (The scripts being scheduled are in PowerShell, though I don’t think that matters).
So, your situation is: "I have a script, I have a complicated date schedule, and I would like my script to be launched according to that schedule.",
and your question is: "How to perform this scheduling in Windows task scheduler?"
My answer would be:
Don't do it like that, but write a new script which verifies the current date, and verifies if the current date corresponds to the complicate date schedule (in that case, launch your original script), and use Windows task scheduler to launch this new script on a daily basis.
As for making that new script, this URL explains how to perform date handling in Powershell.
This particular use case can actually be done fully in the Task Scheduler.
When adding a new trigger, select Monthly then for Months select <Select all months>. Then, change the radio button below it to Onand chooseLastand`.
May I suggest a solution:
In VBA write a very short Sub routine indicating the current date (using "Now() + 1".
Then use "instr(1,string1,""/"")" to see whether the second entry in the resulting date (such as "5/1/2022") is a "1". If it is, then you can issue a warning on a prepared Notepad.txt the day before the 1st of the month that also provides an answer to your question regarding scheduling an event on the 1st of every month. The routine is to run (in the background) every day until it reaches this particular occurrence.
I want to schedule a job on a specific day at a specific time with some interval. I am using gocron scheduler for this. But I can't find a way to start a job on specific day. e.g. I want to execute a job on 7 Sept 2019 at 330pm. From 7 Sept, I want that job to be executed daily or weekly. How can I do that using gocron. or Any other packages available?
I tried passing UTC time to gocron.At() but its panics as it's expecting only "03:30" time formats and doesn't expect date.
When looking at the documentation for gocron, it does not seem to be designed to support scheduling things for specific days. It seems to be designed as a way to schedule things to run at various intervals, very similar to what the original cron utility was designed to do. So you would specify "I want this function to get called every 2 hours" or "I want this function to get called every Sunday at 3PM". There does not seem to be any documentation about starting jobs from a specific day.
The mentioned At(string) method is documented as allowing you to specify a time of day to run something. So you would use that to set that your job runs at 3:30PM.
If you wish to specify a start time, you would likely need to find another scheduling library or implement it yourself by creating a goroutine that sleeps until a specific time. The StackOverflow post mentioned by domcyrus looks like an excellent resource for implementing it yourself as well as listing some other scheduling libraries.
I have a build with a finish build trigger and i want to limit it to run only in specific time domain (e.g. between 4 AM to 5 AM) regardless to the finish build trigger, any suggestions?
Another solution is to pause build configuration. You can pause build configuration using REST API.
You could remove the finish build trigger and add an extra step to the triggering build which calls the rest api.
By adding a bit of logic around the call the check the time is in the required range, you should be able to achieve what you are after.
You can use cron-like expressions to write schedule triggers that will trigger your build at customized times. You can read the teamcity specs here
For example , if you want to run a target everyday at 4.30 AM , you would have to define it in the following syntax.
Seconds 0
Minutes 30
Hours 4
Day-of-month *
Month *
Day-of-week ?
I have a script that must run at a certain hour for the amount of time I specify.
I'm looking at the clockwork gem (https://github.com/tomykaira/clockwork) which seems to be the closest piece of software I might eventually use to accomplish this, unfortunately it doesn't seem to give the ability to set a duration (start at 3PM stop 5PM), meaning I have to split the feature in 2, starting the script is going to be clockwork's job, stopping it is in the script itself with a custom solution.
Very suboptimal and messy.
How does people do this in Ruby? TIA
There is great gem called whenever for same job. With it you can set exact time for your task, like:
every 1.day, :at => '4:30 am' do
runner "MyModel.task_to_run_at_four_thirty_in_the_morning"
end
But you'll have to have two stages, one for starting one for stopping your job, which seems to be more natural than job which kills itself at some time by my opinion.
Somewhat janky, but there is another solution. I'm not sure what you are using to host your app, but on Heroku you can set up a scheduler to run every 10 minutes, on the hour, or daily. Then inside the method that the scheduler calls, you can determine the current time. Say you only want to run it between 3pm and 5pm, you would just wrap your code inside an if statement that verifies the current time is between 3pm and 5pm (watch out for time conversions with UTC).
Hope this helps.
can some one please tell me, how can I checks each minute and reports on who logs in and who logs out?
For starting point, take a look here:
http://www.unix.com/shell-programming-scripting/39579-users-who-loged-within-5-minutes.html
Using who -s gives you the log in times of the users currently logged in. The link above uses a 5-minute threshold to filter the list, but you can change it to 1-minute.
You can either make a script that does the above and then sleeps for 60 seconds in a while loop or maybe use cron to set up this to run every minute (though I would prefer a script for short periods like that).
You would miss the users who logged in and out between the two script runs, though.
I guess you would need more then a script if you need a more robust solution.
You can use the "last" command to get a list of recent login history. Do you want to see the login/logouts since you last ran the script, or literally in the last minute?