Skip to content

Instantly share code, notes, and snippets.

@Yvictor
Created November 18, 2018 05:42
Show Gist options
  • Save Yvictor/d856b097e632e0dcec96c5af34529551 to your computer and use it in GitHub Desktop.
Save Yvictor/d856b097e632e0dcec96c5af34529551 to your computer and use it in GitHub Desktop.
exec js script at specific time
execTime = new Date(2018, 10, 18, 15, 0, 0)
btn = document.querySelector(".winlink.detailSwitch")
setTimeout(() => {
btn.click()
console.log(new Date().getMilliseconds(), Date())
}, execTime.getTime() - new Date().getTime())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment