How to resave all user accounts on a schedule?
Ultimate Cron
Provides a UI where you can schedule all the cron jobs. Example:


Job Scheduler
Provides an API to schedule jobs.
Simple example:

// Declare scheduler.

  function example_cron_job_scheduler_info() {
    $schedulers = [];
    $schedulers['example_unpublish'] = [
      'worker callback' =&gt; 'example_unpublish_nodes',
    ];
    return $schedulers;
  }

// Add a job.

  $job = [
    'name' =&gt; 'example_unpublish',
    'type' =&gt; 'story',
    'id' =&gt; 12, // must be unique
    'crontab' =&gt; * 3 * * 0, // Every Sunday at 3 AM
    'periodic' =&gt; TRUE, // set to false if you want to just run once.
  ];
  $service = \Drupal::service('job_scheduler.manager');
  $service-&gt;set($job);

// Work off a job.

  function example_update_users_total(\Drupal\job_scheduler\Entity\JobSchedule $job) {
    // Do stuff.
  }


There is more examples &amp; info in the READ.ME, so read it.

Important
It's important to note that the above in reality is scheduled to run the next time someone visits the site after 3am on Sunday. So if no one visits the site until say 9am on Sunday, it will not run until 9am. This is because Drupal's Cron can only run when Drupal is initialized.
The only way to be sure that it runs at 3am, you have to set a cron job in your server (just know that your server time may not be the same as your timezone, so you'll have to check that), using the crontab -e command (for linux) will open the file where you can add jobs to the server. Have this server job run a file that contains code that performs a GET request on your site. OR alternatively a custom Drush command like Kevin commented.