Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
to solve the heavy issue of publishing at, is it possible to build an external code that read "publish at/remove at" fields and made the task?
Well you could put some code in the app start to:
Has this been run today? Is the current date time within the range to run the code? if it is go and call this method x and method y
Method x does publishing Method y does removing
You could create seperate section in Umbraco to do this so you had some sort of interface where you could select the time and date ect :).
Hope that makes sense.
Charlie
I have some idea, but how query database to see which content nodes have "publish at" and "remove at" configured?
I find it.
Using this query:
SELECT D.nodeId, D.releaseDate, D.expireDate FROM dbo.cmsDocument D WHERE D.newest = 1 AND ( ( D.releaseDate IS NOT NULL AND D.releaseDate <= GETDATE() ) OR ( D.expireDate IS NOT NULL AND D.expireDate <= GETDATE() ) );
with results:
2772 NULL 2014-05-23 00:00:00.0003555 2014-09-19 16:12:00.000 NULL3573 2014-09-19 15:57:00.000 NULL3580 2014-09-19 09:05:00.000 NULL2809 2014-05-22 00:00:00.000 NULL
I can cycle on this rows and for NodeID ( see first column ), I publish/unpublish node.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Workaround for publishing at datetime: how create a scheduled task?
Hi,
to solve the heavy issue of publishing at, is it possible to build an external code that read "publish at/remove at" fields and made the task?
Well you could put some code in the app start to:
Has this been run today? Is the current date time within the range to run the code? if it is go and call this method x and method y
Method x does publishing Method y does removing
You could create seperate section in Umbraco to do this so you had some sort of interface where you could select the time and date ect :).
Hope that makes sense.
Charlie
I have some idea, but how query database to see which content nodes have "publish at" and "remove at" configured?
I find it.
Using this query:
SELECT D.nodeId, D.releaseDate, D.expireDate FROM dbo.cmsDocument D WHERE D.newest = 1 AND ( ( D.releaseDate IS NOT NULL AND D.releaseDate <= GETDATE() ) OR ( D.expireDate IS NOT NULL AND D.expireDate <= GETDATE() ) );
with results:
2772 NULL 2014-05-23 00:00:00.000
3555 2014-09-19 16:12:00.000 NULL
3573 2014-09-19 15:57:00.000 NULL
3580 2014-09-19 09:05:00.000 NULL
2809 2014-05-22 00:00:00.000 NULL
I can cycle on this rows and for NodeID ( see first column ), I publish/unpublish node.
is working on a reply...