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.
- View in the task library: tasks.mechanic.dev/automatically-publish-and-unpublish-on-a-monthly-cycle
- Task JSON, for direct import: task.json
- Preview task code:
{
"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
mechanic/user/trigger
mechanic/scheduler/daily
Learn about event subscriptions in Mechanic
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. :)
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.
Found a bug? Got an improvement to add? Start here: ../../CONTRIBUTING.md.
Submit your task requests for consideration by the Mechanic community, and they may be chosen for development and inclusion in the task library!