# Reading the current time, get controller time from URScript

**URL:** <https://forum.universal-robots.com/t/reading-the-current-time-get-controller-time-from-urscript/1815>\
**Category:** Technical Questions\
**Tags:** timing\
**Created:** [March 30, 2018, 1:15pm UTC](https://forum.universal-robots.com/t/reading-the-current-time-get-controller-time-from-urscript/1815 "2018-03-30T13:15:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon71061951](https://avatars.discourse-cdn.com/v4/letter/a/43a26b/32.png) [@anon71061951](https://forum.universal-robots.com/u/anon71061951)\
**Post date:** [March 30, 2018, 1:15pm UTC](https://forum.universal-robots.com/t/reading-the-current-time-get-controller-time-from-urscript/1815/1 "2018-03-30T13:15:41Z")

</div>

Hello all,

Is it possible to execute a part of program code once a day at a specific time (for example in thread). I need to write the value of one variable to the second variable once a day at 4PM. Generally, I have a question whether it is possible to read the current time in an easy way (using only polyscope and Scriptcode).

Thank for help

---

<div class="post-metadata">

**Author:** ![anon42905246](https://avatars.discourse-cdn.com/v4/letter/a/e9a140/32.png) [@anon42905246](https://forum.universal-robots.com/u/anon42905246)\
**Post date:** [March 30, 2018, 6:12pm UTC](https://forum.universal-robots.com/t/reading-the-current-time-get-controller-time-from-urscript/1815/2 "2018-03-30T18:12:23Z")

</div>

As far as I know the answer is no.

I think the simplest solution for your problem would be to set up cron job.

---

<div class="post-metadata">

**Author:** ![jbm](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/jbm/32/614_2.png) [@jbm](https://forum.universal-robots.com/u/jbm)\
**Post date:** [April 4, 2018, 6:53am UTC](https://forum.universal-robots.com/t/reading-the-current-time-get-controller-time-from-urscript/1815/3 "2018-04-04T06:53:20Z")

</div>

Check out [this sample](https://forum.universal-robots.com/t/sample-get-controller-time-in-urscript/1256).

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.universal-robots.com/system/32/1_2.png) [@system](https://forum.universal-robots.com/u/system)\
**Post date:** [January 26, 2021, 10:05pm UTC](https://forum.universal-robots.com/t/reading-the-current-time-get-controller-time-from-urscript/1815/4 "2021-01-26T22:05:19Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
