Pause quartz trigger from database - quartz-scheduler

I'm using SpringMVC, Quartz 2.2.1 with Mysql 5.6.15.
I have a scheduled task that use some web resources. Now the resources are not available, so I need to ignore the task temporarily, waiting for them to be back.
I think changing the code is too much for such a minor issue. While knowing it's not recommended, I guess altering the Quartz Mysql database is the best way to go.
I find this answer suggesting :
UPDATE QRTZ_TRIGGERS SET TRIGGER_STATE = "PAUSED"
the answer is 7 years ago and the replyer not responding, I tried to find the doc saying so, but no luck. I wanna know :
Is this the right way to do, without any side-effect?
What does QRTZ_PAUSED_TRIGGER_GRPS table for? Do I need to alter it?

Related

chaostoolkit rollbacks not happening unless --rollback-strategy explicitly specified

I am using chaostoolkit tool and earlier the rollbacks used to happen if the hypothesis fails after the method injects failure. Now I see a different behaviour and the rollbacks happen only if i specify --rollback-strategy = deviated or always. I have raised a github issue as well which has sample console outputs(https://github.com/chaostoolkit/chaostoolkit/issues/258).
Does anyone know what could be the reason? or some parm to set the rollback strategy in the experiment itself instead of specifying at CLI?
I know it's been a while since this discussion happened. Just wanted to share my thinking on this.
Some time ago, I did a rather large refactoring internally and, as part of this, I believe I may have introduced this change without realising it.
I realised this some months ago but I'm not sure what path to take. My feeling is that I should revert back to the original, and specified behavior. But I'm concerned about the effect on existing deployments.

How do I continue where I left off in Spring Batch?

So I wrote an ItemReader. When this app is run from the command line again I want to continue reading from where I left off. How do I do that?
I've added spring-task. It seems to track certain things. Does it help with this?
Everything I have read online seems to be talking about restarting the job after a failure. I don't think I have any use for that. I've added all of my stuff into the ExecutionContext. Should I use the JobRepository and start looking around for the last successful execution?

Alfresco, recognize when a workflow is started

I use Alfresco Community 5.2 and my need is to perform some work when one of the default Alfresco's workflow is started.
I could override all the workflows definitions, but I wonder if there is a better and quicker way to do that. The perfect would be a behavior which triggers when a workflow is started.
Is there something like that ?
Any other approach is accepted. Thanks.
There isn't anything similar to a behavior for workflows that I know of, although if your workflows will always have documents attached you could consider binding a behavior to the workflow package type (I don't recall off-hand what that type is--it might just be cm:folder which wouldn't be that useful).
This is kind of a hack suggestion, but you could implement a quartz job that would run every 30 seconds or every minute or so that would use the workflow service to check to see if any new workflows have started since the last check. If so, your code could be notified and passed the workflow ID, process ID, etc.
The straightforward solution is as you suggested in your original post--just modify the out-of-the-box processes with a task listener that fires when the workflow starts.
Following Jeff suggestion, and this tutorial, I managed to implement a task creation/completion listener and do my logic inside those blocks, resolving the problem.

Scheduling java method wit persistance

I need to execute a call to a particular method daily or more, considering that the app may and the machine may reboot.
I saw examples where they just put the thread to sleep but I need persistance, managing system rebooting.
I have to be sure that if I switch off my machine when I reboot it reprises task execution.
I found schedulers as cron4j and quartz but don't get if it's possible, and if it is, how to do that.
With Quartz you will only need to configure it with a persistent job store implementation and that is pretty much all there is to it. I suggest that you read through the Quartz scheduler tutorial, especially the chapter that describes Quartz job stores.

QuickFIX: log rotation feature

It seems QuickFIX has not log rotation feature.
Is it possible to do it somehow?
This post shows the rotation might have been released longtime ago. There mayn't be any config change to be made, maybe you need to implement it yourself as described in the post.
Here it explains that it isn't possible to rotate without shutting down your engine. Your engine would have the old hook to the logfile and when it sees that the log file doesn't exist, probably would crash. In the same post it explains that divide your multiple seesions for each day, 7 logs for 7 dys in the week. Should be a plausible method to do it, when you shouldn't be restarting your engine in the middle of a day.