Automate closing and opening of a project | XM Community
Skip to main content

Automate closing and opening of a project

  • September 13, 2022
  • 1 reply
  • 25 views

Forum|alt.badge.img+1

Hello guys
I have a survey that start each morning at 8 am and finish at 6 pm for each day.
Is it possible to automate closing and reopening the survey?
Thanks

1 reply

Radam
Level 4 ●●●●
Forum|alt.badge.img+33
  • Level 4 ●●●●
  • 171 replies
  • September 15, 2022

It should be possible to add a javaScript redirect based on the hour.
Include it in the header
var hours = new Date().getHours();

if(hours >= 6 && hours <= 8){
window.location.href = "some_url";
}else{
window.location.href = "some_other_url";
}