I have a table in CartoDB 'inland' that I would like to have automatically update each day at 8pm PST. I know that PostgreSQL has no internal function to run an UPDATE COLUMN function at a certain time of day. Is there a way to use Cron or PgAgent to do this? Would I need to setup CartoDB on my local machine instead of only using the webservice?

  • Can't you use a cron in your machine that calls the webservice to do the update th?e Aug 22 '14 at 12:24
  • For the cron to work would I need to leave my computer on and be logged into Windows?
    – cbunn
    Aug 22 '14 at 15:46

Have you considered setting up an UPDATE sql query through a URL such as:

http://{account}.cartodb.com/api/v2/sql?q=UPDATE INTO test_table (column_name) VALUES ('value')&api_key={Your API key}

and then setting up a schedule timer to visit that URL at a specific time of day?

  • I have not considered doing that as I didn't know that was an option. How does that work? Also how would I setup a scheduled timer in my table? It sounds promising though.
    – cbunn
    Aug 26 '14 at 17:31
  • You can find more info on SQL URL queries here link. Basically whenever that URL is visited it will run the query. As far as setting up a timer, it depends on your computer system but I know you can setup a scheduled event in Windows which will tell windows to open the browser and navigate to a specific URL.
    – Daniel
    Aug 27 '14 at 2:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.