Archive / Move Standard Pages via Trigger


(Oliver Kass) #1

Hi,

 

I'm trying to set up a trigger that uses a standard page asset's metadata to set its status to archived and then move it to an archive folder in the asset tree. This will allow us to automatically remove job vacancies from the site.

 

The jobs pages have a metadata field for "Deadline Date" this is what I'm trying to use to start the trigger. i.e. when the date has passed the page is removed from the live site.

 

Some screenshots attached, can anybody shed any light on what I'm doing wrong? Still trying to get my head round triggers....

 

Any help would be much appreciated.

 

Oli

 

 

 

 

 

 

  Screen Shot 2013-11-25 at 09.54.36.png (68.6 KB) Screen Shot 2013-11-25 at 10.01.11.png (9.84 KB)


(Talk) #2

Hi Oli, if the trigger’s not throwing any errors, check that you have metadata time enabled in repeating jobs in the Cron manager.


(Oliver Kass) #3

Hi Jeremy,

 

Thanks for the quick reply. It looks like there is a "Metadata Triggers Cron Job" set to run which I'm guessing is what you are referring to? It's saying it has "deadlocked" the Cron Manager though so this could be why it's not working?

 

Does the actual setup of the Trigger look ok?


(Bart Banda) #4

The setup looks ok, but the metadata date field might not be. It needs to be in ISO standard format, so the output of it needs to include hours, minutes and seconds.

 

If you only want editors to set the date, that's fine, you can hardcode the rest into the output to always be at the end of the day, for example, try setting the output of the metadata date field to:

 

Y-m-d 23:59:59

 

Let us know how that goes. 


(Oliver Kass) #5

Thanks Bart,

 

That seems to make sense. I've updated the metadata field to contain hours, mins & secs and regenarated etc. I'm not sure I can test it though if the cron managaer is "deadlocked"? It looks like the route user has to fix this?


(Nic Hubbard) #6

Thanks Bart,

 

That seems to make sense. I've updated the metadata field to contain hours, mins & secs and regenarated etc. I'm not sure I can test it though if the cron managaer is "deadlocked"? It looks like the route user has to fix this?

 

A System Admin user will need to do this.


#7

ello, A root user will have to clear the deadlock or as Nic says your trusty System Admin - though if you can see that the cron manager is deadlocked  it is not usually normal that  just a backend user has access to System Management.

 

If you have a SLA I would check that team are aware your clearing the locks ( as the jobs are run by CMS Administrator)

http://manuals.matrix.squizsuite.net/system-management/chapters/cron-manager


(Oliver Kass) #8

Thanks for everyone's help. The issue was with the action in the trigger. It should have been "create link" instead of "create future" lineage. This was causing the Cron to fall over.