Which scheduler in python helps to run cron-type scheduling for one-time execution at a particular date and time? - python-3.x

I want to run a python cron-type scheduler and schedule a job for one time execution at a particular date and time. Once the job is done, the job has to disappear, while the scheduler still continues to run. Also looking for examples of using scheduler and storing jobs in mongodb or redis.

You can use celery for this.Celery helps you run tasks in background and schedule cron jobs as well.
These docs state that you can
schedule tasks to execute at a specific time
other useful resources.

Related

How to execute cron distributed task in hazelcast IScheduledExecutorService?

I have hazelcast cluster and I'm currently using in my project TaskScheduler from Spring to execute cron tasks.
I would like to use hazelcast IScheduledExecutorService to schedule a cron task on all members, and to schedule a multiple cron tasks which will be distributed equally across cluster, but I can't find the appropriate method.
I can't find method in IScheduledExecutorService that have cron trigger in parameter, only timeUnit. Do you know any solutions to this?
IScheduledExecutorService is not a full cron scheduler, for it only allows the scheduling of a single future execution and/or a fixed rate execution but not periodic executions at fixed times, dates or intervals. So if you are happy to do something like:
executorService.schedule(new SomeTask(), 10, TimeUnit.SECONDS)
where SomeTask will run after 10 seconds, then you can choose any of the following APIs to submit your task:
scheduleOnMember: On a specific cluster member.
scheduleOnKeyOwner: On the partition owning that key.
scheduleOnAllMembers: On all cluster members.
scheduleOnAllMembers: On all given members.
Check reference manual for details: https://docs.hazelcast.org/docs/4.0.1/manual/html-single/index.html#scheduled-executor-service

Issue after Quartz Web Restart- Quartz triggers all the scheduled jobs which has been pasted

I setup JDBCJobStore for store jobs and schedule the jobs by Cron.
Sometimes, I will manually stop the Quartz Scheduler in order to bypass some scheduled job to be triggered for some specific purpose.
However, I face an issue after re-starting the Quartz Scheduler. All the jobs which was scheduled will be triggered at same time even through the next schedule time has been due. I check the database and find all the jobs has been scheduled and saved in QRTZ_FIRED_TRIGGERS table, but not can be delete. Cron only re-schedule jobs after run.
Is there any way to make Quartz to re-schedule job by Cron when I re-start the Quartz Server and without trigger these expired schedule?
Any help will be highly appreciated.
Best Regards,
Dean Huang
The job will be reschedule by Cron if I configure as RAMJobStore and setup job by xml, but not JDBCJobStore.

How long before a process automatically dies by itself

I am trying to optimize the time how many times my cron job runs to create a python script.
I want to know how can I find or know before a process dies by itself so that way I can run my cron job accordingly
Trying to setup the time schedule of my cron job to run a python script on linux server
no code

How to make slurm make a scheduling decision when jobs are submitted?

I'm using back-fill scheduler with Slurm to manage a small GPU cluster. The backfill scheduler makes a scheduling decision every bf_interval seconds (default value is 30 seconds). This means even when GPU resources are available sometimes I have to wait for a while until the they are allocated. I can obviously reduce bf_interval but given that we don't have a lot of job submissions it'd be good if I could force slurm to run the scheduling routine the moment a job is queued. Is this possible?
By default Slurm does it. From the documentation:
Slurm is designed to perform a quick and simple scheduling attempt at events such as job submission or completion and configuration changes.
Have you change the default configuration for this? And, are you sure that not scheduling on submission is your problem?

Automatically spawn an Azure Batch AI job periodically

I want to automatically start a job on an Azure Batch AI cluster once a week. The jobs are all identical except for the starting time. I thought of writing a PowerShell Azure Function that does this, but Azure Functions v2 doesn't support PowerShell and I don't want to use v1 in case it will be phased out. I would prefer not to do this in C# or Java. How can I do this?
Currently, there's no option available to trigger a job on Azure Batch AI cluster. Maybe you want to run a shell script which in turn can create a regular schedule using system's task scheduler. Please see if this doc by Said Bleik helps:
https://github.com/saidbleik/batchai_mm_ad#scheduling-jobs
I assume this way you can add multiple schedules for the job!
Azure Batch portal has "Job schedules" tab. You can go there, add a Job, and set a schedule for the Job. You can specify the recurrence in the Schedule
Scheduled jobs
Job schedules enable you to create recurring jobs within the Batch service. A job schedule specifies when to run jobs and includes the specifications for the jobs to be run. You can specify the duration of the schedule--how long and when the schedule is in effect--and how frequently jobs are created during the scheduled period.

Resources