jobs

Are There Any Cron Jobs Alternative?

只谈情不闲聊 提交于 2019-11-28 09:21:53
Cron Jobs are closed on my server and server admin doesn't accept open it. Because , cron jobs slowing server etc. So, i need an alternative. I have to run a php file ( cron.php ) every 2 minutes. So, how can i do this ? DaJF Even though the question was posted a while ago, I just had the same problem but found a solution (based on Kissaki's answer , thanks!) and thought I'd post it here for anyone still looking for a possible solution. Prerequisites: SSH access Python Code (python): from subprocess import call import time while True: call(["php","cron.php"]) time.sleep(120) Depends on your

Kubernetes Job Cleanup

ぃ、小莉子 提交于 2019-11-28 09:01:31
From what I understand the Job object is supposed to reap pods after a certain amount of time. But on my GKE cluster (Kubernetes 1.1.8) it seems that "kubectl get pods -a" can list pods from days ago. All were created using the Jobs API. I did notice that after delete the job with kubectl delete jobs The pods were deleted too. My main concern here is that I am going to run thousands and tens of thousands of pods on the cluster in batch jobs, and don't want to overload the internal backlog system. It looks like starting with Kubernetes 1.6 (and the v2alpha1 api version), if you're using

Which sector of software industry uses C++? [closed]

允我心安 提交于 2019-11-28 03:07:10
Like most people, I learnt C++ after C. I learnt C++ because it was one of those languages which fetched jobs. I am still studying (doing masters) though. One of my cousins has been working as a developer for around 12 years. He advises me to learn Java so that I can land up in a good job. He says only few sectors like tele communications use C++ and almost all the enterprise software is developed in Java. I am working as a student technician in my university. The job involves Windows programming in C++. I learnt core Java. I do not know any of those Struts , Hibernate or whatever is out there

How to cancel queued job in Laravel or Redis

廉价感情. 提交于 2019-11-28 02:53: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

bg / fg inside a command line loop

試著忘記壹切 提交于 2019-11-28 00:44:34
问题 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

Executing SQL Server Agent Job from a stored procedure and returning job result

寵の児 提交于 2019-11-27 23:30:45
Need to have a stored procedure that calls a SQL Server Agent Job and returns whether or not the job ran successfully or not. So far I have CREATE PROCEDURE MonthlyData AS EXEC msdb.dbo.sp_start_job N'MonthlyData' WAITFOR DELAY '000:04:00' EXEC msdb.dbo.sp_help_jobhistory @job_name = 'MonthlyData' GO Which starts the job, whats the best way to get back if the job ran successfully or not? Ok made an edit and used WAITFOR DELAY as the job normally runs between 3-4 mins never longer than 4. Does the job but is there a more efficient way to do it? You can run the query: EXEC msdb.dbo.sp_help

Avoid heroku server from sleeping

倾然丶 夕夏残阳落幕 提交于 2019-11-27 23:11:43
I got a website hosted on a Heroku server ( i'm a new to Heroku btw ), and as it's under the free package, it sleeps after 30m of inactivity , and to put it in action again when a user hits it, it takes around 7 secs to npm run start successfully. I'm thinking of run a nodejs job or something that open the website every 29m so that the server never sleeps, initially, I got something like this: (function wakeup() { require('open')('https://mywebsite.herokuapp.com', (err) => { if (err) throw err; console.log('Woke up!'); setTimeout(wakeup, 1740000); //29m }); })() N.B.: That just opens it in a

How do I get tcsetpgrp() to work in C?

安稳与你 提交于 2019-11-27 22:58:31
I'm trying to give a child process (via fork() ) foreground access to the terminal. After I fork() , I run the following code in the child process: setpgid(0, 0); And: setpgid(child, child); In the parent process. This gives the child its own process group. The call to setpgid() works correctly. Now I want to give the child access to the terminal. I added the following to the child after the setpgid() call: if (!tcsetpgrp(STDIN_FILENO, getpid())) { perror("tcsetpgrp failed"); } After that, there is an execv() command to spawn /usr/bin/nano . However, instead of having nano come up, nothing

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

独自空忆成欢 提交于 2019-11-27 18:51:50
问题 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

Related jobs in JSprit

浪子不回头ぞ 提交于 2019-11-27 18:44:54
问题 Is it possible to handle relations between jobs (in this case services) in jsprit? For instance one job has to start at the same time with one or more other jobs. Or one job must not start before the end of another job (normal sequence). If not, do you know other java libraries that can handle such kind of restrictions? Thank you! 回答1: Yes you can handle such relations with jsprit . It is a bit of coding, but - I think - easy to implement. To illustrate it, I prepared you five examples that