entre semana

This commit is contained in:
2025-03-23 19:14:25 +01:00
parent 90de00cc22
commit cd8c30b9f3
2 changed files with 3 additions and 2 deletions

View File

@ -55,7 +55,7 @@ def cargar_tareas_desde_csv(indices):
for hora in range(horaInicio.hour, horaFin.hour + 1): for hora in range(horaInicio.hour, horaFin.hour + 1):
scheduler.add_job( scheduler.add_job(
search_indice, search_indice,
trigger=CronTrigger(hour=hora, minute=0, day="*"), trigger=CronTrigger(hour=hora, minute=0, day_of_week="0-4"),
args=[obj] args=[obj]
) )
logging.info(f"✅ Tarea agregada para {nombre} a las {hora}:00") logging.info(f"✅ Tarea agregada para {nombre} a las {hora}:00")
@ -68,7 +68,7 @@ def cargar_tareas_desde_csv(indices):
@asynccontextmanager @asynccontextmanager
async def lifespan(app: FastAPI): async def lifespan(app: FastAPI):
scheduler.start() scheduler.start(paused=False)
yield yield
scheduler.shutdown() scheduler.shutdown()

View File

@ -4,6 +4,7 @@ services:
context: ./app context: ./app
dockerfile: Dockerfile dockerfile: Dockerfile
container_name: fastapi-app container_name: fastapi-app
restart: always
ports: ports:
- "8003:8000" - "8003:8000"
environment: environment: