Kaseya Community

Time variable?

  • Does anybody know how to get the current time in a script? I'm trying to insert it into a "send message" so that if the user is away from their PC they can see what time it was sent when they return.

    Legacy Forum Name: Time variable?,
    Legacy Posted By Username: richardprice
  • There is probably a variable native to Kaseya, but "echo %time% >> currentTime.txt" also works.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: SMason
  • Thanks, I was more looking for something to include in the send message though...something like below:


    Send Message
    Parameter 1 : Backup of #vMachine.LoginName# profile on #vMachine.ComputerName# finished at %TIME%
    Parameter 2 : 1
    OS Type : 0


    where %TIME% is replaced by something that works.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: richardprice
  • How about #vAgentConfiguration.lastCheckin#?

    SMason's solution would get you a more accurate time, but this would get you pretty close.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: rkniffin
  • That's more like I was looking for - I'll give that a go. thanks

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: richardprice
  • where is a list of all the variables? A nice complete list would be handy. I'm sure i've looked for / found something before but does anyone know?

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: chris@busy.co.nz
  • chris@busy.co.nz
    where is a list of all the variables? A nice complete list would be handy. I'm sure i've looked for / found something before but does anyone know?


    Online help under Kaseya Views will give you the complete list.

    Legacy Forum Name: Scripts Forum,
    Legacy Posted By Username: andrew.doull@computer-care.com.au