Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to support run in LOCAL time #41

Closed
daiguadaidai opened this issue Feb 13, 2023 · 1 comment
Closed

How to support run in LOCAL time #41

daiguadaidai opened this issue Feb 13, 2023 · 1 comment

Comments

@daiguadaidai
Copy link

can you give solve LOCAL TIME problem example code?

and you can use LOCAL in job/mod.rs file, line: 112

about code:

Utc modify Local

        Ok(Self(Arc::new(RwLock::new(Box::new(CronJob {
            data: JobStoredData {
                id: Some(job_id.into()),
                last_updated: None,
                last_tick: None,
                next_tick: schedule
                    .upcoming(Utc)             //////////////////////// here
                    .next()
                    .map(|t| t.timestamp() as u64)
                    .unwrap_or(0),
                job_type: JobType::Cron.into(),
                count: 0,
                extra: vec![],
                ran: false,
                stopped: false,
                #[cfg(feature = "has_bytes")]
                job: Some(job_data_prost::job_stored_data::Job::CronJob(
                    job_data_prost::CronJob {
                        schedule: schedule.to_string(),
                    },
                )),
                #[cfg(not(feature = "has_bytes"))]
                job: Some(job_data::job_stored_data::Job::CronJob(job_data::CronJob {
                    schedule: schedule.to_string(),
                })),
            },
            run: Box::new(run),
            run_async: Box::new(nop_async),
            async_job: false,
        })))))
@mvniekerk
Copy link
Owner

Please check version 0.10.0 if it works better for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants