jobs

Laravel 5.1 failed queued jobs fails on failed() method, prevents queue failure event handler from being called

余生长醉 提交于 2019-12-21 04:52:10
问题 I am testing the queue functions in Laravel 5.1. I can make jobs queue up in my db table, called jobs, and I can get them to run successfully. I also created a queue failure table called failed_jobs. To test it, inside the jobs table I manipulate the payload data to make it fail then I run the queue worker daemon like so, so it will put the job in the failed_jobs table after one failed attempt: php artisan queue:work --daemon --tries=1 --queue=myqueue When the job fails it is immediately put

What's the best way to start a background process, that can get accessed later on

只谈情不闲聊 提交于 2019-12-21 02:51:26
问题 I am currently developing a RubyGem that provides an executable. The executable keeps track of the state of some log files using the FSSM gem. This executable should get started, do something in background, and get stopped later on. For example: $ my_executable start # do something different... $ my_executable stop I would first start a new process, that does the file watching stuff, inside the start method. But I don't know how to address this process for stopping it. What's the best way to

How to create a scheduled job in SQL server 2008 via T-SQL?

旧街凉风 提交于 2019-12-20 13:58:02
问题 I want to create a job which deletes records from a database after a period of time has passed. For example I have a field in news table Time Stamp and each month a SQL query runs like a scheduled job against my database and deletes news where the time stamp is two month old. Generally I want to delete news for 2 month ago and older to not let my table become a large table. How can I accomplish this? 回答1: you should create a job in SQL below is a sample T-SQL for create a job via SQL agent

How to schedule a job once every Thursday using Kue?

余生长醉 提交于 2019-12-20 12:46:08
问题 Using Kue, how do I schedule a job to be executed once every Thursday? The Kue readme mentions that I can delay a Job, but what about repeatedly executing the Job at a specific time? I can do what I want with a cron job, but I like Kue's features. What I want is to process a Job once anytime on Thursday, but only once. 回答1: I had a similar question and I basically came up with the following. If anyone else has a different solution I would love to see some other ideas. var jobQueue = kue

Exit zsh, but leave running jobs open?

霸气de小男生 提交于 2019-12-20 08:06:12
问题 Just switched from bash to zsh. In bash, background tasks continue running when the shell exits. For example here, dolphin continues running after the exit : $ dolphin . ^Z [1]+ Stopped dolphin . $ bg [1]+ dolphin . & $ exit This is what I want as the default behavior. In contrast, zsh's behavior is to warn about running jobs on exit , then close them if you exit again. For example here, dolphin is closed when the second exit -command actually exits the shell: % dolphin . ^Z zsh: suspended

How to Guess schema in Mysqlinput on the fly in Talend

大兔子大兔子 提交于 2019-12-20 07:13:30
问题 I've build a job that copy data from a mysql db table to b mysql table. The table columns are the same except sometimes a new column can be added in table a db. i want to retrieve all the columns from a to b but only those that exists in table b. i was able to put in the query specific select colume statment that exists in table b like: select coulmn1,column2,columns3... from table a the issue is if i add a new column in b that matches a the talend job schema in Mysqlinput should be changed

How to automatically STOP SQL Server Agent when no jobs are running?

我们两清 提交于 2019-12-20 04:11:30
问题 I have around 40 different sql server jobs in one instance. They all have different schedules. Some run once a day some every two mins some every five mins. If I have a need to stop sql server agent, how can I find the best time when no jobs are running so I won't interrupt any of my jobs? 回答1: how can I find the best time when no jobs are running so I won't interrupt any of my jobs? You basically want to find a good window to perform some maintenance. @MaxVernon has blogged about it here

Linked Server failing on SQL Server job

北城余情 提交于 2019-12-19 22:12:12
问题 I have a linked server that perfectly works when executing a query. But when I place the query in a job, it fails. Here is the setting of my linked server Error 回答1: Read SQL Server Agent job fails when the job uses a linked server. WORKAROUND To work around this problem, use one of the following methods: Method 1 Make the system administrator the owner of the job . Method2: Use mapped security context for the linked server and modify the job to run as OSQL. To set the mapped security context

Linked Server failing on SQL Server job

眉间皱痕 提交于 2019-12-19 22:11:08
问题 I have a linked server that perfectly works when executing a query. But when I place the query in a job, it fails. Here is the setting of my linked server Error 回答1: Read SQL Server Agent job fails when the job uses a linked server. WORKAROUND To work around this problem, use one of the following methods: Method 1 Make the system administrator the owner of the job . Method2: Use mapped security context for the linked server and modify the job to run as OSQL. To set the mapped security context

Configuring Quartz.Net to stop a job from executing, if it is taking longer than specified time span

北战南征 提交于 2019-12-19 22:01:53
问题 I am working on making a scheduler, just like Windows Scheduler using Quartz.Net. In Windows Scheduler, there is an option to stop a task from running if it takes more than the specified time. I have to implement the same in my scheduler. But I am not able to find any extension method/setting to configure Trigger or Job accordingly. I request some inputs or suggestions for it. 回答1: You can write small code to set a custom timout running on another thread. Implement IInterruptableJob interface