[{"data":1,"prerenderedAt":433},["ShallowReactive",2],{"project-32935506":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":42,"post_text":45,"what":46,"said":90,"maker_in_thread":210,"shape":221,"grid":225,"attempts":395,"same_week":396,"maker_shows":33,"maker_hidden":425,"reader_version":426,"card":427},"32935506","Rocketry","Statement-based scheduling framework for Python","title","Show HN: Rocketry – Statement-based scheduling framework for Python","https:\u002F\u002Fgithub.com\u002FMiksus\u002Frocketry","github.com","Miksus",1663829070,2022,168,67,359,2570,14,"notable","dev_tools","task scheduler library","library",[24,25,26,27],"python scheduler","task scheduling","cron alternative","python tasks","curious",0.082,{"positive":31,"neutral":32,"mixed":33,"critical":34},6,23,1,2,32,{"design":37,"execution":39,"idea":40,"docs":41},{"positive":34,"critical":38},0,{"positive":34,"critical":38},{"positive":34,"critical":33},{"positive":38,"critical":33},[43,44,44,38,43,43,38,44,44,38,44,38,38,44,44,38,44,33,38,38,38,44,44,44,38,44,44,38,43,44,38,44,44,38,44,33,38,43,38,44],5,3,null,{"problem":47,"audience":54,"pricing":45,"motivation":63,"time_to_build":45,"stack":71,"openness":88,"stage":89,"team_size":88},{"value":48,"source":49,"evidence":50},"Scheduling Python tasks with dependencies, conditions, error handling and concurrency beyond cron","maker",[51],{"id":52,"by":11,"text":53},"32936993","Putting it mildly, this is nothing more than a sophisticated Python while loop. And it's not as performance friendly as Cron due to that Rocketry runs on Python. You need to be…",{"value":55,"source":56,"evidence":57},"Python developers who need scheduled or conditional tasks","inferred",[58,59],{"id":52,"by":11,"text":53},{"id":60,"by":61,"text":62},"32935664","bckr","Anyone using this? It's not spelled out, but it's apparent you just run the python file containing the app definition and leave it running in the background? Looks very clean and…",{"value":64,"source":65,"evidence":66},"Maker built it after hand-rolled schedulers ran into the same issues","commenter",[67],{"id":68,"by":69,"text":70},"32944966","aidos","This looks brilliant. I like that it’s kept light as a concept - feels like you can just sprinkle it over your existing tasks without getting bogged down in complex…",[72,78,84],{"value":73,"source":49,"evidence":74},"Python",[75],{"id":76,"by":11,"text":77},"32936463","Of course I have this running though it's still running older version (been too busy with developing this). It has been running over half a year for my scrapers without a single…",{"value":79,"source":49,"evidence":80},"SQLAlchemy",[81],{"id":82,"by":11,"text":83},"32937392","You can do without a database backend but of course then the task logs are not kept in case of restart. Currently you can use any SQL database that SQLAlchemy supports, MongoDB…",{"value":85,"source":49,"evidence":86},"MongoDB",[87],{"id":82,"by":11,"text":83},"unknown","launched",{"praise":91,"objections":108,"requests":123,"questions":145,"alternatives":171},[92,97],{"value":93,"source":65,"evidence":94},"Clean, pythonic API and light configuration",[95,96],{"id":60,"by":61,"text":62},{"id":68,"by":69,"text":70},{"value":98,"source":65,"evidence":99},"Native async and choice of execution mode (async, thread, process)",[100,104],{"id":101,"by":102,"text":103},"32936504","realyashnag","Biggest win I see here is the native support for async methods. Celery, the default option for most, does not support it and there are only hacky ways to make async work. Kudos…",{"id":105,"by":106,"text":107},"32936747","reedf1","Being able to configure simply the execution (async, process, thread) is pure gold, I am tempted to use it for this alone.",[109,117],{"value":110,"source":65,"evidence":111},"Requires a Python process to keep running, less efficient than cron",[112,116],{"id":113,"by":114,"text":115},"32936762","chirau","I don't really use schedulers for work and have never really worked with them. So this may sound trivial but do i have to keep a terminal open and the script running for this to…",{"id":52,"by":11,"text":53},{"value":118,"source":49,"evidence":119},"No built-in missed-task handling yet",[120],{"id":121,"by":11,"text":122},"32935868","I wrote my own ideas of how it compares to APScheduler (and other alternatives) here:…",[124,131,138],{"value":125,"source":65,"evidence":126},"Multiple time zone support",[127],{"id":128,"by":129,"text":130},"32947731","smaccona","Does this support multiple time zones simultaneously? We have clients that are in different time zones, and (for example) they all want weekly summary emails every Monday morning…",{"value":132,"source":65,"evidence":133},"Monitoring UI showing run history",[134],{"id":135,"by":136,"text":137},"32943503","qkhhly","if it provides monitoring ui (e.g. success\u002Ffailure status for last N runs), then i'd seriously give it a try.",{"value":139,"source":65,"evidence":140},"API accessible from other languages",[141],{"id":142,"by":143,"text":144},"32937445","dwils098","I like the idea, but this should be an api that can be accessed from any language.",[146,157,164],{"value":147,"source":65,"evidence":148},"How task state persists across restarts",[149,153],{"id":150,"by":151,"text":152},"32937484","pid-1","Hey cool project, congrats! How does Rocketry saves execution state? Like, if it crashes and goes back up again, does it know which tasks were executed and which ones were not?",{"id":154,"by":155,"text":156},"32935855","alexmolas","Does it keep track of the status of each task? Imagine I run an app with three processes A, B, C. A runs perfectly, but B fails and halts the app. If I start the app again, is it…",{"value":158,"source":65,"evidence":159},"How it compares to APScheduler",[160],{"id":161,"by":162,"text":163},"32935752","jwmoz","Interesting. How does this compare to APScheduler? How does it deal with concurrently scheduled tasks and the possibility of missed tasks?",{"value":165,"source":65,"evidence":166},"Which backends are supported",[167],{"id":168,"by":169,"text":170},"32936712","pplonski86","What backends do you support? Do I need Redis or it can work with PostgreSQL? Cant find this info in readme.",[172,180,188,196,203],{"value":173,"source":65,"evidence":174},"APScheduler",[175,176],{"id":161,"by":162,"text":163},{"id":177,"by":178,"text":179},"32937476","nickjj","I quickly went through the docs but didn't see a reference to be able to dynamically schedule and unschedule tasks at runtime. I've used APScheduler in the past and it does…",{"value":181,"source":65,"evidence":182},"Celery",[183,184],{"id":101,"by":102,"text":103},{"id":185,"by":186,"text":187},"32940746","powvans","Celery supports solar scheduling, though it's not obvious how you would do +\u002F- some time from the solar event. You would probably need to extend their implementation, but I don't…",{"value":189,"source":65,"evidence":190},"Airflow",[191,195],{"id":192,"by":193,"text":194},"32936835","gigatexal","Add some logging and connectors and you have an airflow replacement with the pipelining or am I missing something?",{"id":52,"by":11,"text":53},{"value":197,"source":65,"evidence":198},"Prefect",[199],{"id":200,"by":201,"text":202},"32943411","mpeg","How does it compare to prefect?",{"value":204,"source":65,"evidence":205},"cron and systemd timers",[206],{"id":207,"by":208,"text":209},"32936808","svennek","... or make CLI version of your tasks and let the system mangement daemon (\"cron\" or in my case systemd timers) handle it. For clarity make a subfolder called \"tasks\" or…",{"comments":211,"answered":212,"key":213},12,8,[214,215,218],{"id":76,"text":77},{"id":216,"text":217},"32937501","If you want an API (or UI), just clone this and modify it as you need: https:\u002F\u002Fgithub.com\u002FMiksus\u002Frocketry-with-fastapi. I also wrote an article to Medium how it works with…",{"id":219,"text":220},"32937548","Thanks a lot, nice to hear! The system knows which task ran and when by extedning logging (from standard library). There is a logger called \"rocketry.task\" that should have a…",{"commenters":222,"max_depth":43,"maker_replies":211,"first_comment_mins":223,"lifespan_hours":224},44,30,21,[226,228,230,232,234,236,237,239,241,243,247,251,253,256,259,262,263,267,271,274,277,280,281,283,284,285,287,288,291,294,297,300,302,305,308,310,311,313,315,317,321,323,325,326,328,331,334,335,338,342,345,347,350,354,358,362,366,369,371,376,379,381,383,386,390,392,394],[60,38,43,227,61,38],"project\u002Fpositive\u002Fdesign",[76,38,38,229,11,33],"maker\u002Fneutral\u002Fnone",[142,38,44,231,143,38],"project\u002Fmixed\u002Fdesign",[216,38,38,233,11,33],"project\u002Fpositive\u002Fnone",[150,38,44,235,151,38],"project\u002Fneutral\u002Fexecution",[219,38,38,229,11,33],[68,38,43,238,69,38],"project\u002Fpositive\u002Fidea",[240,38,43,238,151,38],"32937436",[101,33,43,242,102,38],"project\u002Fpositive\u002Fexecution",[244,34,44,245,246,38],"32936939","project\u002Fneutral\u002Fidea","lep",[248,34,38,249,250,38],"32937104","other\u002Fneutral\u002Fnone","jon-wood",[252,34,44,245,246,38],"32937515",[254,34,38,249,255,38],"32937960","orwin",[257,34,38,258,246,38],"32938597","commenter\u002Fneutral\u002Fnone",[260,34,44,245,261,38],"32938884","xani_",[185,34,38,249,186,38],[264,34,44,265,266,38],"32937979","project\u002Fneutral\u002Fdesign","musingsole",[268,34,44,269,270,38],"32938422","project\u002Fneutral\u002Fdocs","xwowsersx",[272,34,38,249,273,38],"32938843","tonyhb",[275,34,38,276,270,38],"32946230","other\u002Fneutral\u002Fdesign",[278,34,38,249,279,38],"32940142","charlieyu1",[128,44,44,245,129,38],[161,282,44,245,162,38],4,[121,282,38,229,11,33],[168,43,44,269,169,38],[82,43,38,286,11,33],"maker\u002Fneutral\u002Fdocs",[154,31,44,235,155,38],[289,31,38,290,11,33],"32935926","maker\u002Fneutral\u002Fexecution",[207,292,33,293,208,38],7,"project\u002Fcritical\u002Fidea",[295,292,44,245,296,38],"32937288","wodenokoto",[298,292,38,249,299,38],"32937689","bhargav",[301,292,38,249,208,38],"32941944",[303,292,38,249,304,38],"32937355","anyfactor",[306,292,38,249,307,38],"32937823","dr-neptune",[309,292,38,249,304,38],"32942028",[177,212,44,245,178,38],[312,212,38,290,11,33],"32937884",[314,212,44,245,178,38],"32938181",[316,212,38,229,11,33],"32938681",[318,319,44,269,320,38],"32935673",9,"antman",[322,319,38,286,11,33],"32935888",[113,324,44,245,114,38],10,[52,324,38,229,11,33],[327,324,44,235,61,38],"32940310",[329,330,44,235,299,38],"32937660",11,[332,330,38,249,333,38],"32937702","BeefWellington",[105,211,43,242,106,38],[336,211,38,249,337,38],"32936793","moffkalast",[339,340,44,235,341,38],"32935744",13,"L3viathan",[343,340,44,235,344,38],"32935842","anakaine",[346,340,38,258,341,38],"32936556",[348,18,44,245,349,38],"32942916","hamasho",[351,352,38,249,353,38],"32940696",15,"melony",[355,352,44,356,357,38],"32940762","project\u002Fneutral\u002Fnone","lddemi",[359,360,38,249,361,38],"32941134",16,"encoderer",[363,364,38,249,365,38],"32940989",17,"rajasimon",[367,364,38,249,368,38],"32941102","pottertheotter",[192,370,44,245,193,38],18,[372,373,33,374,375,38],"32936733",19,"project\u002Fcritical\u002Fdocs","laserlight",[377,373,38,258,378,38],"32936787","andijcr",[380,373,38,265,11,33],"32936864",[382,373,43,227,333,38],"32937774",[384,373,38,385,11,33],"32937898","maker\u002Fpositive\u002Fidea",[387,373,38,388,389,38],"32937076","commenter\u002Fneutral\u002Fdocs","drothlis",[391,373,38,388,375,38],"32938238",[135,393,44,265,136,38],20,[200,224,38,249,201,38],[],[397,402,407,411,415,420],{"id":398,"name":399,"points":400,"category":401},"32993130","Quazel",787,"learning_science",{"id":403,"name":404,"points":405,"category":406},"32943224","Open Prompts",279,"data",{"id":408,"name":409,"points":410,"category":20},"32939407","Dub",255,{"id":412,"name":413,"points":414,"category":20},"32941613","Ezno",175,{"id":416,"name":417,"points":418,"category":419},"32976832","muted.io guitar chords",157,"languages",{"id":421,"name":422,"points":423,"category":424},"32962524","Jot",146,"productivity",false,"v2",{"id":428,"name":5,"line":6,"ai":425,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":429,"top":18,"kw":430,"maker":11,"domain":10,"tier":19,"attempts":38,"strip":431,"url":9,"mix":432,"praise":93,"objection":110,"sub":21},32935506,0.08,[24,25,26,27],"5330550330300330310003330330530330310503",[31,32,33,34],1794036625376]