Files generated by cron will not be there for a web process. Here's a basic summary of how Heroku's dyno grid works:
When you push up a copy of your app, we run a compile process on it (runs bundler, etc) and generate a slug which is a self-contained copy of your app. When you request any process be run on your app (dyno, worker, cron) we find available space in our dyno grid, copy the slug for your app to that server, mount the slug, and launch the process you requested. In short, the process for your dyno may not even be on the same server that your cron was run on. If you need persistent storage I'd suggest using something like S3. Cheers, David On Tue, Mar 8, 2011 at 11:12 AM, Wes Gamble <we...@att.net> wrote: > The files comprise a cache that needs to be there for the next user, even if > that user is the one who's unfortunate enough to "wake up" the app. > > W > > On 3/8/11 9:54 AM, Miles Smith wrote: > > I always assume my cronies is running brand new instances. > > Why not just check if you files are there, if not , create them. > > On Mar 8, 2011 3:39 AM, "Wes Gamble" <we...@att.net> wrote: >> Given a Heroku app.: >> >> If I have a cron job that populates a cache directory in RAILS_ROOT/tmp >> once a day, and all of my dynos go idle, when they "wake up", will the >> "tmp" directory be empty or will it still contain what my cron job wrote? >> >> (I think the deeper question here is whether a dyno "wakes up" in some >> pre-existing state, or whether a dyno. is simply reconstituted from the >> slug state at deploy-time? I apologize if my phrasing is >> awkward/imprecise.) >> >> If "tmp" will be empty, do we have any way to hook into the "dyno >> wake-up process" in order to do some filesystem initialization in /tmp? >> >> Thanks, >> Wes >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Heroku" group. >> To post to this group, send email to heroku@googlegroups.com. >> To unsubscribe from this group, send email to >> heroku+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/heroku?hl=en. >> > -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to heroku@googlegroups.com. > To unsubscribe from this group, send email to > heroku+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to heroku@googlegroups.com. > To unsubscribe from this group, send email to > heroku+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en. > -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to heroku@googlegroups.com. To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.