I have a script file for parsing through a SQLite database. I now need to create a CRON job that wi开发者_开发知识库ll download and unzip said database from a third-party (already hosting as SQLITE). I understand this can be done using WGET and UNZIP, but given Heroku's read only file system, is this possible entirely in memory? Thanks.
Heroku's file system is read-only but you can use the tmp
and log
directory from within your application folder.
From Heroku's doc:
There are two directories that are writeable: ./tmp and ./log (under your application root). If you wish to drop a file temporarily for the duration of the request, you can write to a filename like #{RAILS_ROOT}/tmp/myfile_#{Process.pid}. There is no guarantee that this file will be there on subsequent requests (although it might be), so this should not be used for any kind of permanent storage.
精彩评论