When I run the script 1.txt from cli, I do get a “random” password every time.
But if you run the script scheduled, it will not be random, since it uses hour/minutes/seconds to make the random, and this will be the same if you set it to run once a week etc.
PS you should post the script using code tags </> like this:
1.txt
{
:local wifiprofile wifi_security_profile
:local toEmail yourmail@domain.com
:local time [:pick [/system clock get time] 0 2];
:local min [:pick [/system clock get time] 3 5];
:local sec [:pick [/system clock get time] 6 8];
:local char;
:set char ( $char . [ :pick $time 1 ] . [ :pick $time 0 ]);
:local char1;
:set char1 ( $char1 . [ :pick $min 1 ] . [ :pick $min 0 ]);
:local char2;
:set char2 ( $char2 . [ :pick $sec 1 ] . [ :pick $sec 0 ]);
:local arrayalpha ("2","C","h","Y","!","f","j","c","}","q","k",":","(","}","3","Y","T","|","C","v","}","n","8","I","r","4","p","V","6",":","S","V","=","p","Z","T","6",")","l",":","K","b","=","Y","7","X","c","P","@","g","m","U","T","_","g","v","N","j","E","g","f","D","h","!","W","p","U","z","T","S","}","h","M","Y","i","E","c","4","!","Q","(","<","Y","h","@","e","q","7","]","l","R","-","h","S","w","(",">","/","r","=","<","I","&","5","@","!","|","h","p","l","1","Y","U","2","J","R","T","Y","}","=","b","c","$","9","d","e","@","S","6","W","B","Q","$","S","b","p","}","3","m","X","g","8","y","j","h","S","Z","F","@","!","t","}","!","U","j","/","W","5","}","a","g","!","S","S","T","{","7","f","G","W","T","_","/","k","3","+","T","X","p","m","!","e","i","L","]","3","d","G","T","+","@","H","!","Q","k","X","@","P","Q","+","k","f","K","T","S","{","Q","W","S","<","S","z","z","k","V","@","X","{","4","g","t","X","1","h","5","k","T","_","f","i","{","]","(","Y","/","1","j","h","l","]","S","3","b","Y",":","i","T","j","h","T","7","w","g","D","X","g","T","T","i","|","S","R","!","}","D","d","c","h","d","T","l","N",")","V","u","Z","T","}",":","{","S","m","Z","d","}","Z","Z","S","Y","|","_","d","k","v","h","(","7","/","-");
:local new;
:set new ( $new . [ :pick $arrayalpha ($time+$min+$sec) ] . [ :pick $arrayalpha ($time+$sec) ] . [ :pick $arrayalpha ($min+$sec) ] . [ :pick $arrayalpha $sec ] . [ :pick $arrayalpha $char ] . [ :pick $arrayalpha $char1 ] . [ :pick $arrayalpha $char2 ] . [ :pick $arrayalpha ($char+$char1+$char2) ]);
:local arrlengh [:len $arrayalpha];
:put "Our Array Lengh is $arrlengh Your New String is $new";
}