Code Monkey home page Code Monkey logo

Comments (2)

alachaum avatar alachaum commented on August 27, 2024

@wagnerpereira Thanks for raising this issue. GCP Cloud Tasks does not allow tasks to be scheduled more than 30 days in the future unfortunately. This limits Cron schedules to cron tasks every 30 days at most...

I believe the best approach here would be to propose another Cloudtasker cron extension leveraging GCP Cloud Scheduler (on top of the native Cloud Tasks implementation). See #20

In the meantime you can work around this limitation by configuring your job to run every day then add the following logic inside your job:

class MyMonthlyWorker
  include Cloudtasker::Worker

  def perform(*args)
    # Abort unless we're the first of the month
    return unless Time.current.day == 1

    # ... job logic
  end
end

It's not pretty but it's the best I can propose just now. I'll check if I can implement a workaround on the current task-based implementation. If I can't come up with something then I will prioritize the implementation of scheduler-based cron jobs as this issue is clearly a major one.

I have added a limitations section in the cron documentation to reflect that issue.

from cloudtasker.

wagnerpereira avatar wagnerpereira commented on August 27, 2024

Thanks @alachaum , it was exactly what we did to bypass until we find an elegant way to solve this google tasks limitation using cloud scheduler.

I would offer help to update the documentation but I saw you already did. Thanks again.

🙌

from cloudtasker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.