Hello,
I have the following script written up to update a module to hold Today's date and time.
The script worked fine when I was using my username and was prompted for the password.
As I am looking to schedule this script everyday, I want ahead and downloaded the certificate linked to my user and changed the script as seen on user guides.
However I still get prompted for a password.
Can someone please help me?
This is the script:
@echo off
set AnaplanUser="anaplanadmin@withings.com"
set WorkspaceId="8a81b09457ee03b601581c074c2a04e2"
set ModelId="C0A17C7D902343359BA909CCD3D3DC7E"
set Operation -certificate "C:\Users\Elisa\Documents\certificate-222628677637089600518301929753078471363.cer" -export
:: This script looks up the current date, writes it to a csv file, and sends it to Anaplan
:: Here we set the file path of the csv file we will be writing the current date too
set FileName="C:\Users\Elisa\Downloads\anaplan-connect-1-3-3-5\anaplan-connect-1-3-3-5\CurrentDate.csv"
:: rem This is a simple for loop that parses the date /t function
FOR /f "tokens=1,2,3 delims=-" %%a in ('date /t') do (set mm=%%b& set dd=%%c& set yyyy=%%a)
set mydate=%yyyy%%mm%%dd%
@echo "Current Date","Heure"> %FileName%
@echo "%mydate%","%TIME%">> %FileName%
set Operation=-file "CurrentDate.csv" -put %FileName% -import "Today from CurrentDate.csv" -execute -output "C:\Users\Elisa\Downloads\anaplan-connect-1-3-3-5\anaplan-connect-1-3-3-5\Errors"
rem *** End of settings - Do not edit below this line ***
setlocal enableextensions enabledelayedexpansion || exit /b 1
cd %~dp0
if not %AnaplanUser% == "" set Credentials=-user %AnaplanUser%
set Command=.\AnaplanClient.bat %Credentials% -workspace %WorkspaceId% -model %ModelId% %Operation%
@echo %Command%
cmd /c %Command%
pause