Add monthly clustered task in PowerShell - windows

I have a big problem with creating: clustered monthly task on windows server via PowerShell.
All info which I found about my problem was monthly, but locally. I need tasks on cluster.
Anyone can help me with some code to create that task ?
Best regards.
Bartolini

I decided to create daily tasks. On startup parameters I will sent a day number and month. Then check on which date number and month I want to run that task, if it's match then execute.

Related

Oracle job alert for DBMS job

I am trying to create an alert for a dbms scheduler job if it is running for a duration longer than expected. For example, if a job that usually takes 2 hours to run is now running for more than 2.5 hours, I want to be notified.
What would be the best way to do this? Can I use Oracle Enterprise Manager for this?
I achieved this by setting the parameter max_run_duration in the dbms job.
An event will be raised if the job run time exceeds the time mentioned in the property.

Heroku scheduler not running hourly

I used heroku scheduler to automate tasks but it seems it's not working as it described
see this
although the frequency is set to hourly
the interval between last run and next due is 5 hours
what's going on here?
Any help is appreciated!
In my case, i just had to create another task, hourly from the beginning, and it worked. The old schedule was removed as the new one started to work.

Spring Batch with support of Scheduler

Scenario: The system needs to check the Product table in the database DAILY to check every product's expiration date. The system needs to get a list of products with expiration dates matching the current date. Then, removes these products in the database.
Things to consider:
- Runs a single query to retrieve products that has matching expiration date.
- Remove these products in the database.
- We are talking about thousands of products here.
QUESTION: Is there a need for me to create a Spring Batch Job supported with Scheduler for this or just a Scheduled Job to do this efficiently?
Because in Scheduled Job, I can just schedule the checking and removing daily. And its done. At the same time, I can also do it using Spring Batch with Scheduler. But, what do you think is the more efficient way?
i think spring batch would be a wise decision, if you need to restart your job with more steps inside. otherwise, if it's really just one job, you could solve that restart functionality anyway manually...
all those spring-batch configuration aren't that heavy in your applicationcontext, but you need to create tables for the according repository. (perhaps you gotta stage those tables as well..)
Spring Batch:
if you need restart-functionality
Common Scheduling: Easy and fast, ain't need that much knowledge about the framework

How to run Scheduler add-on at Heroku once per month?

In the selection of how often I want to run my action the only options are "Daily", "Hourly" and "Every 10 minutes".
Thanks! I want to run the Scheduler for my Rails 3.1 app.
Not an elegant solution, but you could schedule it to run daily and check the date is the first of the month at the start of your job before actually doing the work.

how to check if scheduler backups ran successfully

on each of our remote servers a scheduler task is created that calls an .exe program that shuts down the databases at 10:00:00 everyday (it create database backups)and start it up again at a specific time.now using the delphi application i need to now how can i check if the scheduler task backups were ran successfully(database shutdown and startup)...the ideas was to try and connect to the scheduler Task using delphi application and check the last run time(when didi it last execute or run the .exe using the DATETIME variable),status(is it running)..please assist i can connect to the server in delphi but i cant connect to the scheduler task in the server.
This is what I'm doing for my own automated backups: The application that does the actual backup updates a DATETIME column in the database with the last successful backup date and time. From the usual client application I can read the given DATETIME column and issue warnings if backups are getting old.
Advantages: Nothing complicated about it (KISS!), no need to figure out API's to read the scheduler, no need to figure out "exit codes" for when the backup started but wasn't successful, works even if backups are being made from multiple locations.

Resources