cron

Cron xdotool doesn't run

大城市里の小女人 提交于 2021-02-08 21:52:49
问题 I am new to using crontab, and I've been trying to get a simple cron job. I want press F5 every 1 minute to refresh Mozzila Firefox. I am using xdotool for press F5. I have script /usr/local/bin/refresh.sh: #!/bin/bash xdotool search --name "Mozilla Firefox" key F5 If i run it in command line it works fine. And permission: -rwxr-xr-x. 1 root root 89 15. čec 10.32 refresh.sh In crontab i have: */1 * * * * cd /usr/local/bin && sh refresh.sh But script run by cron doesnt work. Can anyone tell me

cron library for java

无人久伴 提交于 2021-02-08 19:47:13
问题 I am looking for a cron expression library in java. Something that can parse cron expressions and return me future fire times for the trigger. API on the lines of. CronExpression cronExpression = new CronExpression("0 30 4 * * *"); List<Date> fireTimes = cronExpression.getFireTimes(todaysDate, nextWeekDate); I don't want to use something as complicated as quartz. The purpose is to basically use cron like a regex for timings. That's all. I do not want a background scheduler. I tried googling

Cron job on a large database with PHP, suggestions needed

ⅰ亾dé卋堺 提交于 2021-02-08 15:17:37
问题 I've heard about cron job and don't think the actual creation of it will be that hard to make but I've some concerns about how this will work with a large script. Without going too much off-topic on my project i will stick with the basics about my situation. I need to make a script that every day performs a CURL fetch for data on a remote website and updates an database for each featured member on my website with it. In short, it's approximatively at this time 1000 times the script need to be

Pass date command as parameter to kubernetes cronjob

你说的曾经没有我的故事 提交于 2021-02-08 10:40:32
问题 I want to execute data migration through Kubernetes cronjob using Luigi pipeline. My luigi task receives --start parameter which I want to pass through cronjob command. apiVersion: batch/v1beta1 kind: CronJob metadata: name: migration spec: schedule: "0 0 */1 * *" jobTemplate: spec: template: spec: serviceAccountName: spark containers: - name: migratecronjob image: latest-image imagePullPolicy: Always env: - name: TAG value: latest-image - name: MIGRATION_TAG value: migration-v05 command: -

source bashrc doesn't work in cron

北战南征 提交于 2021-02-08 10:30:54
问题 All we know that cron ignores variables defined in “.bashrc” and “.bash_profile”, so we have to define it inside cron. I constantly do the same what was written inside the similar question https://unix.stackexchange.com/questions/67940/cron-ignores-variables-defined-in-bashrc-and-bash-profile but still global variables inside .bashrc still not working. I found way to execute it - by defining sh script with "set +a" bashrc script. But "source" still doesn't work. SHELL=/bin/bash BASH_ENV=/root

Microsoft graph, batch request's nextLink

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-08 10:27:21
问题 I'm currently implementing a sync queue service to sync a webapp's customers to Outlook's contacts. I'm using the Graph API for the job. The creation and updating of contacts is done using graph's batch request. There's a part in the docs about the response that I don't fully understand and pretty much ignored. I just want to make sure my implementation is correct. In addition to the responses property, there might be a nextLink property in the batch response. This allows Microsoft Graph to

Microsoft graph, batch request's nextLink

喜你入骨 提交于 2021-02-08 10:26:08
问题 I'm currently implementing a sync queue service to sync a webapp's customers to Outlook's contacts. I'm using the Graph API for the job. The creation and updating of contacts is done using graph's batch request. There's a part in the docs about the response that I don't fully understand and pretty much ignored. I just want to make sure my implementation is correct. In addition to the responses property, there might be a nextLink property in the batch response. This allows Microsoft Graph to

Laravel - How to run a function/controller every minute ? (Task Scheduling)

早过忘川 提交于 2021-02-08 10:20:12
问题 https://laravel.com/docs/5.4/scheduling Hey Guys , I have a controller method that i want to run every minute . I read the documentation for Task Scheduling but it seems to document Commands only. Is there any way that i can use it to call a route/controller method/script every minute ? <?php namespace App\Http\Controllers; use App\Http\Controllers\Controller; use DateTime; use Illuminate\Support\Facades\DB; use App\Acc; class ScriptController extends Controller { public function UpdateAcc()

Schedule Azure VM to turn on, run a script and turn off

白昼怎懂夜的黑 提交于 2021-02-08 07:23:49
问题 I have a multi-container app that I need to run twice a day at specific times for about 30 mins each time. To save costs, I would like to: Turn on a Linux VM on Microsoft Azure Run a script that runs docker-compose up -d , waits 30 mins, then calls docker-compose stop Turn off the VM I'd love for this to happen automatically on a cron schedule. So far, I've failed to find any Azure solution that can do all of this. Azure automation allows you to turn on/off VMs but it doesn't allow you to run

System is not terminated in scala application in docker on GKE

こ雲淡風輕ζ 提交于 2021-02-08 06:24:37
问题 I have a scala application that uses Akka Streams and running as a cronjob in Google Kubernetes Engine. But the pod is still in the “Running” state (not completed). And the Java process is still running inside the container. Here's what I do exactly: I build the docker image with sbt-native-packager and sbt docker:publish . When the job is done, I terminate it with regular system.terminate call. implicit val system: ActorSystem = ActorSystem("actor-system") /* doing actual stuff */ stream