计划任务,每隔n分钟打开一次URL / PHP文件,基于Raspberry Pi中MySQL DB的值

I'm hoping someone can help me find the best/easiest solution for a problem I'm having. I have a Raspberry Pi (Raspbian) that is operating a LAMP server. I am looking for a simple way to call one of the local PHP files every n minutes based on a record stored on the local MySQL database. The file is available at a local and remote URL so both of those are options as well.

I considered using a cron job but I don't know of any way to use a variable amount of time for this task.

I'm using this PHP file to execute some basic tasks and post data to a Spark Core so until I get this figured out, I'm stuck manually calling the URL.

  1. set up a google script with the code to call your sparkcore

    (see code)

  2. call your google script with a trigger

example showing a google script: How to post to Google Docs Form directly

// google script code example to access spark core
function getDevices(accessToken) {
  var url = "https://api.spark.io/v1/devices?access_token="+accessToken;
  var response = UrlFetchApp.fetch(url);
  return response;
}