Cron Expression to Run job on every 8th Day - quartz-scheduler

I recently integrated Hangfire in my project and it is working fine. I am having some long running jobs that are actually taking 4-5 days to complete, So what I am trying to do is to Run these jobs on every 8th day means if it triggers on 1st Feb then 9th Feb then 17 Feb like this.
Can any one help me in creating the Cron Expression for this, as CronExpressionBuilder class doesn't have such function to create Cron Expression.

Issue Resolved.
I changed my apporach and using below mentioned cron expression..
RecurringJob.AddOrUpdate(() => Console.Write("Recurring"), "0 10 */8 * *");
And is working like a charm.

Related

Setting Job name for Spring batch job

I have a requirement to run the same job multiple times in a day. For example: the job name is myHourlyJob. This job needs to run every hour and there is a validation that I need to do to check that for a day all 24 jobs ran successfully. My requirement is to add dynamic param in the jobname so I can identify each job based on the name.
For example :
the job running on 1st Jan at 9am, the job name should be : myHourlyJob_20220109_9.
the job running on 1st Jan at 2pm, the job name should be : myHourlyJob_20220109_14.
In general job name = myHourlyJob_YYYYMMDD_jobRunHour
It is possible to define the job name in Spring batch?
I believe the job name should not be changed, it is the same the job so it should have the same name. What you are describing is exactly the concept of job instance in Spring Batch, one instance for each hour in your case. It is the same job, it does the same thing over and over again, why should it have 24 names a day?
I suggest you keep a single name for your job, and launch a different instance every hour. In your case, the run time (the hour of the day) should be passed as an identifying job parameter and you will have 24 job instances for the same job per day. Please refer to the reference documentation for more details about these concepts.

Sequence run time and parallel run time issue

All
I have been created one sequence in datastage and in that seq there are 18 parallel jobs.
After completion of sequence I found two scenario
scenario 1:
I have checked summary of sequence in which I have seen that my first job's start time is 1:30 pm and completion time is 1:40 pm but when I checked parallel job's log then I found that job has started at 1:35 pm and completion is 1:40 pm.
scenario 2:
Next job has started after 1st job but not immediate completion of 1st job there are 9 minutes of gap between 1st job finish time and 2nd job run time.
please help us to understand the scenario and also help us to resolve the issue.

Incorrect failure notification from Rundeck during fall time change

Last night was "fall back" time change for most locations in the US. I woke up this morning to find dozens of job failure notifications. Almost all of them though were incorrect: the jobs showed as having completed normally, yet Rundeck sent a failure notification for it.
Interestingly, this happened in two completely separate Rundeck installations (v2.10.8-1 and v3.1.2-20190927). The commonality is that they're both on CentOS 7 (separate servers). They're both using MariaDB, although different versions of MariaDB.
The failure emails for the jobs that finished successfully showed a negative time in the "Scheduled after" line:
#1,811,391
by admin Scheduled after 59m at 1:19 AM
• Scheduled after -33s - View Output »
• Download Output
Execution
User: admin
Time: 59m
Started: in 59m 2019-11-03 01:19:01.0
Finished: 1s ago Sun Nov 03 01:19:28 EDT 2019
Executions Success rate Average duration
100% -45s
That job actually ran in 27s at 01:19 EDT (the first 1am hour, it is now EST). Looking at the email headers, I believe I got the message at 1:19 EST, an hour after the job ran.
So that would seem to imply to me that it's just a notification problem (somehow).
But there were a couple of jobs that were following other job executions that failed as well, apparently because the successfully finished job returned a RC 2. I'm not sure what to make of this.
We've been running Rundeck for a few years now, this is the first I remember seeing this problem. Of course my memory may be faulty--maybe we did see it previously, only there were fewer jobs affected or some such.
The fact that it impacted two different versions of Rundeck on two different servers implies either it's a fundamental issue with Rundeck that's been around for a while or it is something else in the operating system that's somehow causing problems for Rundeck. (Although time change isn't new, so that would seem to be somewhat surprising too.)
Any thoughts about what might have gone on (and how to prevent it next year, short of the obvious run on UTC) would be appreciated.
You can define specific Timezone in Rundeck, check this and this.

Bluemix stage cancelled automatically

I have a stage with two jobs (build and deploy) which is giving me a lot of trouble for the past 2 days.
Yesterday it started to fail about 1 every 4 times I run the stage. The stage is cancelled by itself. First I thought it might be a problem with my code but if I rerun the same execution it failed some of the times.
Today although, I haven't manage to complete a single run (I tried like 20 times in the last 3 hours). Some of the times the build job is cancelled, some others the deploy job.
Anybody facing the same problem? I cannot find where the issue is coming from...
Thanks!

Task Scheduler 6 days a week

I have a backup that I run as a scheduled task every night, then clear out every weekday morning after I check it.
Problem is my server's memory is almost maxed out (can't upgrade with my current host, and still researching others), and the weekend backups are leaving me with no memory by Mon morning.
Is there a way to have Windows Task Scheduler run 6 days a week instead of 7?
if you select weekly you can select which days your task shall run.