(Logged in HQ TFS as Issue 4889.)
__Repro__:
1. Edit / add a data item (supporting publication) or a page.
2. Make a change and set a date/time in the near future, like “in two minutes”
3. Save it (without publishing)
4. Stop the website before publication time has passed (for WebMatrix, click the “Stop” button in the toolbar)
5. Wait for the publication date/time to pass.
6. When passed, restart the website
5. Refresh the tree to see if the data item / page got published as expected
__Expected__: The data item/page is published
__Actual__: Nothing changed
Comments: ** Comment from web user: burningice **
The issue as i read the code, is that each publish/unpublish action as saved as an actual workflow which has a TimeStamp for when it should be run. This will of course only happen if the containing Workflow Runtime environment is running at the time that the publish/unpublish workflow is scheduled to run.
https://bitbucket.org/burningice/composite-c1/src/1d29757e0e3606d702ddd3132daf4b378660068e/CompositeC1/Composite.Workflows/C1Console/Scheduling/PublishControlledHelper.cs?at=default#PublishControlledHelper.cs-107
https://bitbucket.org/burningice/composite-c1/src/1d29757e0e3606d702ddd3132daf4b378660068e/CompositeC1/Composite.Workflows/C1Console/Scheduling/PublishControlledHelper.cs?at=default#PublishControlledHelper.cs-56
A better approach is just to save each publish/unpublish action as a record in a big table with a corresponding TimeStamp. No workflow involved. Then a basic scheduler can run every minute to check if there are records in the table with a TimeStamp equal or less to NOW, and if so, execute the action.