Can Spring Batch Admin automatically launch a job on startup? - spring-batch-admin

I have placed my job xml in the spring/batch/jobs directory and can launch the job from the console by clicking on the launch button. I would like to have the job launch whenever the Tomcat instance where the admin console is deployed starts up. Thanks.

To launch a job on startup, create a bean that launches a job in it's constructor or init method. From there, if you configure it as a bean in Spring, by default it will be a singleton, created once, and therefore launch the job as soon as the context is ready.

Related

How to view logs of running node of ejabberd

I hosted my ejabberd on the AWS cloud server and accessing using putty. I start my ejabberd node using the ./ejabberdctl live command which is working perfectly fine. When I closed my putty session and start again on the next day I can't attach live logs again until I stop that running node and start again. How can I attach live logging of the previously running node?
There are typically two ways to run ejabberd:
A)
ejabberdctl live starts a new node and attaches an interactive shell immediately to it. You view the logs immediately in the shell. This is useful for debugging, testing, developing
B)
ejabberdctl start starts a new node keeping it running in the background. You can see the log messages in the log files (/var/log/ejabberd/ejabberd.log or something like that). This is useful for production servers.
Later, you can run ejabberdctl debug to attach an interactive shell to that node. This is useful when you run a production server, and want to perform some administrative task.

Exception caught When try to terminate a always free ATP database instance

try to terminate a running ATP instance using the following API from oci java sdk.
TerminateDbSystemRequest terminateDbSystemRequest =
TerminateDbSystemRequest.builder().dbSystemId(dbSystemId).build();
databaseClient.terminateDbSystem(terminateDbSystemRequest);
an exception caught
Exception in thread "main" com.oracle.bmc.model.BmcException: (404, NotAuthorizedOrNotFound, false) Authorization failed or requested resource not found.
I can stop and start the atp instance successfully, just wondering which class should be used to terminate the atp instance.
That is the right code to perform the action you are trying to perform using the OCI Java SDK, but it looks like you are hitting one of the two below issues:
dbSystemId is not a valid DB System identifier. One way to confirm if you have the correct dbSystemId value is to confirm if you are able to stop and start the DB System using the same value.
dbSystemId is a valid DB System identifier, but the credentials you are using to terminate the DB System do not have the proper permissions to do so. One way to confirm if this is a permissions issue is to see if, using the same account whose credentials you are using from the Java SDK, you are able to terminate the DB System from the OCI web portal

GCE instance startup script error handling

On GCE platform I have a Managed Instance Group for which a template is assigned.
The template has a startup script (bash) that pulls the latest code from a git repo and installs a few requirements.
Occasionally the startup script fails to update the code or fails to update the requirements.
In this case I would like to abort the startup.
What would be the correct way to go about this?
How do I signal the error?
Can I get the machine to restart or are there other options?

How to specify a specific Windows Event Application log for logging from SSIS package

I'm new to SSIS packages but want to set up process logging to the Windows Event Log. Is there a way to specify an event log other than the general windows application log?
No. The default 'SSIS log provider for Windows Event Log' will only log to the Application log.
Your alternative is to create a custom log provider.

castle scheduler - cluster

We're using the castle scheduler component: http://using.castleproject.org/display/Comp/Castle.Components.Scheduler?showChildren=false
I have a wcf service which creates the tasks and that does it's job fine.
I then have a console app running (will be a windows service eventually) which should then keep an eye out for tasks to run.
Thing is the each create their own scheduler in the DB but they both have the same clusterid.
Should the console app be able to run the tasks created by the wcf service? If not - how can i make it do that?
Cheers
w://
we are advised to not use the castle scheduler.
The guys are building a quartz integration and i have offered my help.