feat: AR-House initial commit
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
' AR-House DealFinder Runner - scraping diario silencioso
|
||||
'
|
||||
' Para usar con Task Scheduler de Windows.
|
||||
' Tarea diaria: ejecutar este .vbs a las 6:00 AM (o el horario que prefieras).
|
||||
' Configurar "Ejecutar tanto si el usuario inicio sesion como si no".
|
||||
'
|
||||
' Lanza Ollama si no esta corriendo, luego corre dealfinder/runner.py --daily.
|
||||
' Output: logs\dealfinder.log
|
||||
Option Explicit
|
||||
|
||||
Dim shell
|
||||
Set shell = CreateObject("WScript.Shell")
|
||||
|
||||
Dim projectPath
|
||||
projectPath = "D:\Proyectos Software\AR-House"
|
||||
|
||||
' Lanzar Ollama si no esta corriendo
|
||||
Dim xmlhttp
|
||||
On Error Resume Next
|
||||
Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
|
||||
xmlhttp.Open "GET", "http://localhost:11434/api/tags", False
|
||||
xmlhttp.Send
|
||||
If xmlhttp.Status <> 200 Then
|
||||
Dim ollamaCmd
|
||||
ollamaCmd = "cmd /c set OLLAMA_MAX_LOADED_MODELS=1 && " & _
|
||||
"set OLLAMA_NUM_PARALLEL=1 && " & _
|
||||
"set OLLAMA_KEEP_ALIVE=0 && " & _
|
||||
"ollama serve"
|
||||
shell.Run ollamaCmd, 0, False
|
||||
WScript.Sleep 8000
|
||||
End If
|
||||
On Error Goto 0
|
||||
|
||||
' Correr el scraper (esperar a que termine, sin ventana visible)
|
||||
Dim runnerCmd
|
||||
runnerCmd = "cmd /c cd /d """ & projectPath & """ && " & _
|
||||
".venv\Scripts\activate && " & _
|
||||
"python -m dealfinder.runner --daily >> logs\dealfinder.log 2>&1"
|
||||
shell.Run runnerCmd, 0, True
|
||||
Reference in New Issue
Block a user