Skip to content

Latest commit

 

History

History

automatically-publish-and-unpublish-on-a-monthly-cycle

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Automatically publish and unpublish on a monthly cycle

Tags: Products, Publish, Unpublish

Use this task to make a single product or page available for a limited window of time, on a monthly basis. Redirect your visitors to a specific page when that resource is unavailable.

Default options

{
  "resource_type__required": "product",
  "resource_id__number_required": null,
  "day_of_the_month_to_publish_resource__number_required": null,
  "day_of_the_month_to_unpublish_resource__number_required": null,
  "redirect_url_when_resource_is_not_published": null
}

Learn about task options in Mechanic

Subscriptions

mechanic/user/trigger
mechanic/scheduler/daily

Learn about event subscriptions in Mechanic

Documentation

Use this task to make a single product or page available for a limited window of time, on a monthly basis. Redirect your visitors to a specific page when that resource is unavailable.

Configure this task using the resource type (either "product" or "page"), a resource ID (learn how to find this), the days of the month for publishing and unpublishing, and the URL you'd like to send visitors to when they land on the resource when it's unpublished.

This task will run automatically, at midnight in your store's local timezone. Run this task manually, using the "Run task" button, if you'd like to test your settings immediately. :)

Installing this task

Find this task in the library at tasks.mechanic.dev, and use the "Try this task" button. Or, import this task's JSON export – see Importing and exporting tasks to learn how imports work.

Contributions

Found a bug? Got an improvement to add? Start here: ../../CONTRIBUTING.md.

Task requests

Submit your task requests for consideration by the Mechanic community, and they may be chosen for development and inclusion in the task library!