onstar2mqtt icon indicating copy to clipboard operation
onstar2mqtt copied to clipboard

Support exiting instead of sleeping

Open jwise-mfg opened this issue 1 year ago • 0 comments

I have multiple cars, so would like to call this with a cron job, once for each car. You could handle this case by checking if the ONSTAR_REFRESH environment variable is 0 (or -1) and instead of sleeping, just exit, eg:

if (onstarConfig.refreshInterval >= 0)
   logger.info('Updates complete, sleeping.');
else
   return process.exit();

jwise-mfg avatar Oct 04 '24 16:10 jwise-mfg