<commit_before>const server = require('./server')
const cron = require('node-cron')

const weeklyReport = require('./weekly_report.js')

server.start(error => {
  if (error) throw error
  server.plugins.model.init((error) => {
    if (error) throw error

    cron.schedule('59 22 * * 7', function () {
      weeklyReport(server.plugins.model.sendEmail, server.plugins.model.weekly)
    })

    console.log(`server started on port ${server.info.port}`)
  })
})<commit_msg>add list of site/location combinations to start script adapt cron job to run for each combination cron job running once per minute for testing! related #127<commit_after>const server = require("./server");
const cron = require("node-cron");

const weeklyReport = require("./weekly_report.js");

const emails = [
  {
    site: "goodmans-fields"
  },
  { site: "woodberry-down", location: "kss4" },
  { site: "woodberry-down", location: "d" },
  { site: "woodberry-down", location: "f" },
  {
    site: "city-road"
  }
];

server.start(startErr => {
  if (startErr) throw startErr;

  server.plugins.model.init(modelErr => {
    if (modelErr) throw modelErr;

    cron.schedule("* * * * *", () => {
      emails.forEach(({ site, location }) => {
        console.log("hello " + site);
        weeklyReport(
          server.plugins.model.sendEmail,
          server.plugins.model.weekly,
          site,
          location
        );
      });
    });

    console.log(`server started on port ${server.info.port}`);
  });
});
{'fraction_non_alphanumeric': 0.1620897521768252, 'fraction_numerical': 0.006028131279303416, 'mean_word_length': 3.1043956043956045, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1506276', 'n_tokens_mistral': 477, 'n_tokens_neox': 465, 'n_words': 108}