Python file batch problem when activating windows task manager

Asked

Viewed 231 times

1

I made a batch file to run a small script in python, it works normally, but when I use windows task scheduler to trigger the batch at a specific time it presents the following error:

inserir a descrição da imagem aqui

Where you say the mistake is on that line, but I can’t see anything wrong with it:

driver = webdriver.Firefox(firefox_binary=binary, executable_path=r'C:\\scrapy\\geckodriver.exe', firefox_profile = profile)

I researched about and talked about what problem with user permission, but I am using a user that is Adm

  • I believe the error is related to non-execution as Adm (super user).

  • but I am as Adm and will not go

  • Yes and I tried, it didn’t work

1 answer

2


Confirm that the options below are marked in the properties of the scheduled task.

Configuração das propriedades da tarefa agendada

Another problem is that for batch to call a second program as administrator it would have to use something like:

runas /user:maquina\administrador programa.exe

which ends up generating a prompt asking for the administrator’s password. For the prompt to be displayed only once use:

runas /savecred /user:maquina\administrador programa.exe

Then run the batch and fill in the administrator’s password. In the next executions the password will no longer be requested.

  • 1

    The setup was right, the runes problem is that the company’s gpo blocks the use of it, so I have to think of another solution, but as your answer would solve the problem of the vast majority I will mark as certain

Browser other questions tagged

You are not signed in. Login or sign up in order to post.