anchor.diff:    ss.registerScopeExitCallback(() => scheduler.stop());
     scheduler.start();
   }
  +
  +void _weekly({
  +  @required String name,
  +  @required NeatPeriodicTask task,
  +}) {
  +  final scheduler = NeatPeriodicTaskScheduler(
  +    name: name,
  +    interval: Duration(days: 6), // shifts the day when the task is triggered
  +    timeout: Duration(hours: 12),
  +    status: DatastoreStatusProvider.create(dbService, name),
  +    task: task,
  +  );
  +
  +  ss.registerScopeExitCallback(() => scheduler.stop());
  +  scheduler.start();
  +}
  
positive.code: /// Setup the tasks that we are running in both analyzer and dartdoc services.
  void _setupJobCleanupPeriodicTasks() {
    // Deletes Job entities that are older than the accepted runtime versions.
    _daily(
      name: 'delete-old-jobs',
      task: () async => await jobBackend.deleteOldEntries(),
    );
  
    // Deletes ScoreCard and ScoreCardReport entities that are older than the
    // accepted runtime versions.
    _daily(
      name: 'delete-old-scorecards',
      task: () async => await scoreCardBackend.deleteOldEntries(),
    );
  
negative.code: /// Setup the tasks that we are running in the search service.
  void setupSearchPeriodicTasks() {
    // Deletes the old search snapshots
    _weekly(
      name: 'delete-old-search-snapshots',
      task: () => snapshotStorage.deleteOldData(),
    );
  