jobs

RAISE_ APPLICATION_ ERROR--之异常处理

百般思念 提交于 2019-11-29 19:09:43
平时用来测试的异常处理 我们都是通过dbms_output.put_line来输出异常信息,但是在实际的应用中,需要把异常信息返回给调用的客户端。 其实 RAISE_APPLICATION_ERROR 是将应用程序专有的错误从服务器端转达到客户端应用程序(其他机器上的SQLPLUS或者其他前台开发语言) raise_application_error(异常类型,传递信息) 异常类型:number 值域:-20000 到-20999 传递信息:varchar2(2000) DBMS_STANDARD包的RAISE_APPLICATION_ERROR过程,可以重新定义异常错误消息,它为应用程序提供了一种与ORACLE交互的方法。语法如下 RAISE_APPLICATION_ERROR(errorNumber,errorString) errorNumber是数值在-20000到-20999之间,errorString为自定义的错误信息。 如: update jobs set job_title = v_newJobTitle where job_id = v_jobid; if sql%notfound then RAISE_APPLICATION_ERROR(-20167,'update failure!'); end if; .......... 当在sqlpus中测试时

SLURM `srun` vs `sbatch` and their parameters

孤街浪徒 提交于 2019-11-29 18:56:37
I am trying to understand what the difference is between SLURM's srun and sbatch commands. I will be happy with a general explanation, rather than specific answers to the following questions, but here are some specific points of confusion that can be a starting point and give an idea of what I'm looking for. According to the documentation , srun is for submitting jobs, and sbatch is for submitting jobs for later execution, but the practical difference is unclear to me, and their behavior seems to be the same. For example, I have a cluster with 2 nodes, each with 2 CPUs. If I execute srun

How to restart scheduled task on runtime with EnableScheduling annotation in spring?

一世执手 提交于 2019-11-29 17:31:28
问题 I have been investigating how to change the frequency of a job on runtime with Java 8 and spring. This question was very useful but it did not totally solve my issue. I can now configure the date when to job should be executed next. But If set the delay to 1 year, then I need to wait 1 year before the new configuration in taken into account. My idea would be to stop the scheduled task if the configuration value is changed (so from another class). Then recalculate the next time the task should

Automatically pulling data from a PowerShell job while running

▼魔方 西西 提交于 2019-11-29 15:55:26
问题 While trying to do something quite possibly beyond the means of PowerShell I seem to have ran into a brick wall. I have a main form script, which orchestrates most of my functions but I need another script to open a listener (system.Net.Sockets.Udpclient.Receive) and keep feeding in information to a textbox in the main form throughout the entire program's running. For the life of me I can't get around this daft non-child environment that jobs suffer from; no dot sourcing, no global scoped

How to cancel queued job in Laravel or Redis

戏子无情 提交于 2019-11-29 13:16:45
How can I browse all the pending jobs within my Redis queue so that I could cancel the Mailable that has a certain emailAddress-sendTime pair? I'm using Laravel 5.5 and have a Mailable that I'm using successfully as follows: $sendTime = Carbon::now()->addHours(3); Mail::to($emailAddress) ->bcc([config('mail.supportTeam.address'), config('mail.main.address')]) ->later($sendTime, new MyCustomMailable($subject, $dataForMailView)); When this code runs, a job gets added to my Redis queue. I've already read the Laravel docs but remain confused. How can I cancel a Mailable (prevent it from sending)?

bg / fg inside a command line loop

冷暖自知 提交于 2019-11-29 07:12:49
ctrl-z (^z) acts in ways I do not understand when done inside a loop executed from a terminal. Say I type for ii in {0..100}; do echo $ii; sleep 1; done then I hit ^z. I'll get: [1]+ Stopped sleep 1 I can resume the job using fg or bg, but the job refers only to he sleep command. The rest of the loop has apparently disappeared, and no more number appear on the terminal. I could use & after the command to immediately run it in the background, or another solution is to wrap the whole thing in a subshell: ( for ii in {0..100}; do echo $ii; sleep 1; done ) then ^z gives me [1]+ Stopped ( for ii in

Elasticse启动报错-java.lang.IllegalStateException: failure when sending a validation request to node

混江龙づ霸主 提交于 2019-11-29 07:01:40
报错问题描述: [2019-09-04T17:51:32,265][INFO ][o.e.c.c.JoinHelper ] [node18701] failed to join {node9701}{rh-c4DTFSsCr3fPYYAhGdQ}{UZxODZrbRey6NRl2gDBwiw}{192.168.1.97}{192.168.1.97:9301}{dim}{ml.machine_memory=8072921088, ml.max_open_jobs=20, xpack.installed=true} with JoinRequest{sourceNode={node18701}{Pj07gNlcRI6PVPZHBLYpkA}{14QtIqnJTVGXV7IyUbtyeA}{192.168.1.187}{192.168.1.187:9301}{di}{ml.machine_memory=8072921088, xpack.installed=true, ml.max_open_jobs=20}, optionalJoin=Optional[Join{term=6, lastAcceptedTerm=1, lastAcceptedVersion=1, sourceNode={node18701}{Pj07gNlcRI6PVPZHBLYpkA}

springBoot启动时,选择可执行的任务

蹲街弑〆低调 提交于 2019-11-29 06:44:07
一次。。有人问我:“boot 启动时 如果想要执行一些任务怎么做?” 我特二的回答。放在spring auto 启动配置项里面 然后在spring容器启动的时候注入。或者使用动态代理。做切面。 虽然上述方式貌似可以执行。但有点复杂。其实boot提供了一种启动后就做的任务操作。 CommandLineRunner 看源码说明为: Spring Batch jobs. Runs all jobs in the surrounding context by default. Can also be used to launch a specific job by providing a jobName。 即,在spring容器启动的时候就开始批处理一些任务。是随spring启动而加载运行的。 使用方式:自定义一个model 实现该及接口并重写run 方法 package org.springboot.sample.runner; import org.springframework.boot.CommandLineRunner; import org.springframework.stereotype.Component; @Component public class MyStartupRunner implements CommandLineRunner { @Override

Step by Step!Kubernetes持续部署指南

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 06:02:55
本文是作者通过亲身实践,从零基础开始,一步一步总结出来的Kubernetes持续部署工作流程。文章从前期的工具准备开始,到复刻存储库、测试、构建镜像、构建流水线最后进行部署,所有的工作流程都一一展现在文章中,对于想要拥有全自动持续交付流水线的用户将有很大的借鉴意义。 在很久很久以前的一份工作中,我的任务是将老式的LAMP堆栈切换到Kubernetes上。那会儿我的老板总是追逐新技术,认为只需要几天时间就能够完成新旧技术的迭代——鉴于那时我们甚至对容器的工作机制一无所知,所以不得不说老板的想法真的很大胆。 在阅读了官方文档并且搜索了很多信息之后,我们开始感到不知所措——有许多新的概念需要学习:pod、容器以及replica等。对我而言,Kubernetes似乎只是为一群聪明的开发者而设计的。 然后我做了我在这一状况下常做的事:通过实践来学习。通过一个简单的例子可以很好地理解错综复杂的问题,所以我自己一步一步完成了整个部署过程。 最后,我们做到了,虽然远未达到规定的一周时间——我们花了将近一个月的时间来创建三个集群,包括它们的开发、测试和生产。 本文我将详细介绍如何将应用程序部署到Kubernetes。阅读完本文之后,你将拥有一个高效的Kubernetes部署和持续交付工作流程。 持续集成与交付 持续集成是在每次应用程序更新时构建和测试的实践。通过以少量的工作

Running multiple scriptblocks at the same time with Start-Job (instead of looping)

隐身守侯 提交于 2019-11-29 04:55:44
Hi all! I've been looking for a way to make my script more efficient and I've come to the conclusion (with help from the nice people here on StackOverflow) that Start-Job is the way to go. I have the following foreach-loop that I would like to run simultanously on all the servers in $servers. I have problems understanding how I actually collect the information returned from Receive-Job and add to $serverlist. PS: I know that I am far away from getting this nailed down, but I would really appreciate some help starting out as I am quite stumped on how Start-Job and Receive-Job works.. # List 4