jobs

Shell script doesn't execute from cron job

☆樱花仙子☆ 提交于 2019-12-24 22:56:29
问题 shell script: #!/bin/sh services=( httpd named proftpd mysqld dovecot postfix webmin) for service in ${services[@]} do if ps ax | grep -v grep | grep $service > /dev/null then echo "$service service running, everything is fine" else echo "$service is not running" service $service start fi done file executable, running from root user command: bash /etc/mycron/checkServices.sh tried sh and just /etc/mycron/checkServices.sh doesn't run 回答1: #!/bin/sh services=( httpd named proftpd mysqld dovecot

Laravel chunk and delete

穿精又带淫゛_ 提交于 2019-12-24 22:33:50
问题 I have a large number of items (1M+) that i want to delete from a database, i fork a background job to take care of that, so that the user won't have to wait for it to finish to carry on whatever he/she was doing, the problem is, the app becomes unresponsive while the items are being deleted, so i thought that i would process the items chunk by chunk and sleep for a couple of seconds then carry on. Here is the code that handles the delete: // laravel job class // ... public function handle()

How to return indefinetely to previous Step when condition of a following Step is reached Spring Batch

风流意气都作罢 提交于 2019-12-24 22:28:24
问题 Hello Spring Batch community! I have an input flat file with a header and a body. header is 1 line (naturally..) and 5 parameters. Body can reach up to 1 million records with 12 parameters each. Input File: 01.01.2017|SUBDCOBR|12:21:23|01/12/2016|31/12/2016 01.01.2017|12345678231234|0002342434|BORGIA RUBEN|27-32548987-9|FA|A|2062- 00010443/444/445|142,12|30/08/2017|142,01 01.01.2017|12345673201234|2342434|ALVAREZ ESTHER|27-32533987-9|FA|A|2062- 00010443/444/445|142,12|30/08/2017|142,02 01.01

Shell script doesn't execute from cron job

筅森魡賤 提交于 2019-12-24 21:06:37
问题 shell script: #!/bin/sh services=( httpd named proftpd mysqld dovecot postfix webmin) for service in ${services[@]} do if ps ax | grep -v grep | grep $service > /dev/null then echo "$service service running, everything is fine" else echo "$service is not running" service $service start fi done file executable, running from root user command: bash /etc/mycron/checkServices.sh tried sh and just /etc/mycron/checkServices.sh doesn't run 回答1: #!/bin/sh services=( httpd named proftpd mysqld dovecot

Run Rails jobs sequentially

六眼飞鱼酱① 提交于 2019-12-24 20:33:01
问题 I have three Rails jobs to process a player yellow/red cards in a soccer tournament, and the penalties these players will have due to getting this cards. The idea is that the first job collects all Incidences (an Incidence is when a Player gets a yellow card, to give an example), and counts all the cards a Player got. class ProcessBookedPlayersJob < ApplicationJob queue_as :default @cards = [] def perform(*args) @cards = [] yellows = calculate_cards(1) reds = calculate_cards(2) @cards <<

Alternative for Zend Job Queue

扶醉桌前 提交于 2019-12-24 17:44:10
问题 Is it alternative solution for Zend Job Queue what could be used without Zend Server ? My application need to accept quick request and provide quick response (receipt) and limit this part to database entry. After this additional process should be executed in background to analyze this request (generate PDF file, send emails with PDF, send text message, etc) I do not want to initial request to wait for all those actions to finish - just provide receipt and let server do it a few seconds later.

Laravel Queued Job doesn't wait for exec to coplete

╄→гoц情女王★ 提交于 2019-12-24 15:15:12
问题 i have my queues set up and working (the jobs get run), however the script doesn't seem to wait for my exec line to run before progressing with the next line of code. This means i'm getting exceptions in the next few lines (because it's looking for a file that hasn't been produced yet) My closure is: Queue::push(function($job) use ($gid,$eid) { $phantomLoc = base_path()."/vendor/bin/phantomjs"; $scriptLoc = app_path()."/libraries/makeVideo.js"; $pageAddress = route('image_maker_video', array(

Creating a job with credentials in jenkins only in command lines

浪尽此生 提交于 2019-12-24 11:57:35
问题 I am only allowed to work with the command line terminal on Ubuntu. I need to create a job in Jenkins with security credentials. I already installed Jenkins in my machine, but the access is open. If I set up security credentials on Jenkins, how can I specify these on the command line? Thanks! 回答1: Follow this steps Generate a public ssh-key in the user you want to work with from the command line. ssh-keygen Just press enter whenever yo are asked to enter some value. Copy the content of the

Job chaining in Lumen 5.5: withChain() not working how can I make it work?

浪子不回头ぞ 提交于 2019-12-24 11:51:42
问题 For dispatching a single job I usually do one of these: Queue::push(new ExampleJob); or dispatch(new ExampleJob); https://lumen.laravel.com/docs/5.5/queues According to the Laravel Docs a certain Job chain, where one Job depends upon the previous is done like this: ExampleJob::withChain([ new OptimizePodcast, new ReleasePodcast ])->dispatch(); https://laravel.com/docs/5.5/queues#job-chaining However this does not workin in Lumen (similar problem here: How to dispatch a Job to a specific queue

Scheduling jobs on windows

℡╲_俬逩灬. 提交于 2019-12-24 08:47:37
问题 What is the best way of scheduling simple batch jobs on windows? My current need is to dump some SVN repositories each night and FTP the dumps to our external FTP side and then e-mail one or more people that the backup has completed/failed. This sounds like the sort of thing I would usually do in a unix script + cron. Is that possible on windows? Perhaps using Cygwin? 回答1: Windows Scheduled Tasks. This area is available through the control panel and may require administrative rights. It's