Expiration date on product variation How can I set an expiration date on a product variation?
I am building a webshop and my goal is to have an expiration date on a product variation, meaning the after a scheduled date, the product would no longer be available to sell, so it would automatically unpublish. Also, vice versa, the product variation might have a publishing date.
Currently I am looking at scheduler, but that is for nodes, not for products. Is there another way of doing this?
Job Scheduler
Provides an API to schedule jobs. Where you can programmatically unpublish product variation in worker callback.
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.

Ultimate Cron
Provides a UI where you can schedule all the cron jobs. You can implement your own hook_cron and then schedule it using Ultimate Cron.