title: How to run Timer-triggered Azure Functions locally on Mac?
body: <p>I want to execute a timer-triggered function in my local development environment (Node, OS X) but it seems to require some changes to the HTTP-triggered functions setup I have.</p>
  <p>Here's the code related to the timer function so far:</p>
  <p><code>/cron-job/function.json</code> defines a timer input binding scheduled to run every minute. It also has a reference to the code entry point (compiled from Typescript):</p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;bindings&quot;: [
      {
        &quot;type&quot;: &quot;timerTrigger&quot;,
        &quot;direction&quot;: &quot;in&quot;,
        &quot;name&quot;: &quot;timer&quot;,
        &quot;schedule&quot;: &quot;0 */1 * * * *&quot;
      }
    ],
    &quot;scriptFile&quot;: &quot;../dist/cron-job/index.js&quot;
  }
  </code></pre>
  <p><code>/cron-job/index.ts</code></p>
  <pre class="lang-js prettyprint-override"><code>import { AzureFunction, Context } from '@azure/functions'
  
  const timerTrigger: AzureFunction = async function (
    context: Context,
    timer: any,
  ) {
    console.log('context', context)
    console.log('timer', timer)
  
    // move on with async calls...
  }
  
  export default timerTrigger
  
  </code></pre>
  <p><code>/local.settings.json</code></p>
  <pre class="lang-json prettyprint-override"><code>{
    &quot;IsEncrypted&quot;: false,
    &quot;Values&quot;: {
      &quot;FUNCTIONS_WORKER_RUNTIME&quot;: &quot;node&quot;,
      &quot;AzureWebJobsStorage&quot;: &quot;&quot;
    }
  }
  </code></pre>
  <p>When I try to start the function app:</p>
  <pre class="lang-sh prettyprint-override"><code> ~/Projects/test-api (dev) $ func start --verbose
  </code></pre>
  <p>I get an error:</p>
  <pre><code>Missing value for AzureWebJobsStorage in local.settings.json. This is required for all triggers other than httptrigger, kafkatrigger. You can run 'func azure functionapp fetch-app-settings &lt;functionAppName&gt;' or specify a connection string in local.settings.json.
  </code></pre>
  <p>When I add <code>AzureWebJobsStorage</code> setting to the <code>local.settings.json</code> I get another error:</p>
  <pre><code>The listener for function 'Functions.cron-job' was unable to start.
  The listener for function 'Functions.cron-job' was unable to start. Microsoft.Azure.Storage.Common: Connection refused. System.Net.Http: Connection refused. System.Private.CoreLib: Connection refused.
  </code></pre>