scheduler

rust
use anyhow::{anyhow, Result};
use chrono::{DateTime, Utc};
use cron::Schedule as CronSchedule;
use std::str::FromStr;

pub struct Schedule {

Parse Cron Expressions and Run Due Recurring Jobs in Rust with Tokio

rust tokio cron
by codesnips 3 tabs
php
<?php

namespace App\Console\Commands;

use App\Jobs\CompileReportJob;
use Carbon\CarbonImmutable;

Schedule a Recurring Report Job in Laravel's Console Kernel

laravel scheduler cron
by codesnips 3 tabs
java
public final class Debouncer implements AutoCloseable {

    private final ScheduledExecutorService scheduler;
    private final long delayMillis;
    private final AtomicReference<ScheduledFuture<?>> pending = new AtomicReference<>();

Debouncing Rapid Method Calls in Java with a Scheduler and Cancellable Futures

java concurrency debounce
by codesnips 3 tabs
rust
use std::cmp::{Ordering, Reverse};

#[derive(Debug, Clone)]
pub struct ScheduledTask<T> {
    pub priority: u8,
    pub seq: u64,

Priority Task Scheduler in Rust with BinaryHeap and Reverse Ordering

rust binary-heap scheduler
by codesnips 3 tabs
php
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

Aggregate Daily Sales into a Summary Table with a Laravel Console Command

laravel php console-command
by codesnips 4 tabs
go
package scheduler

import (
	"context"
	"log"
	"sync"

Graceful Cron-Style Scheduler in Go With Ticker and Context Cancellation

scheduler ticker context
by codesnips 3 tabs
typescript
export interface CronFields {
  minute: Set<number>;
  hour: Set<number>;
  dayOfMonth: Set<number>;
  month: Set<number>;
  dayOfWeek: Set<number>;

Cron-Expression Scheduler with Field Parser and a Tick Loop in TypeScript

cron scheduler parser
by codesnips 3 tabs