32 lines
790 B
Bash
Executable File
32 lines
790 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Embedding pipeline cron job script
|
|
# This script runs the advanced embedding pipeline periodically
|
|
|
|
# Set working directory
|
|
cd /app
|
|
|
|
# Create log directory if it doesn't exist
|
|
mkdir -p logs
|
|
|
|
# Get current timestamp
|
|
TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S")
|
|
|
|
# Log file
|
|
LOG_FILE="logs/embedding_pipeline_$TIMESTAMP.log"
|
|
|
|
echo "Starting embedding pipeline at $(date)" >> $LOG_FILE
|
|
|
|
# Run the embedding pipeline
|
|
python3 advanced_embedder.py >> $LOG_FILE 2>&1
|
|
|
|
if [ $? -eq 0 ]; then
|
|
echo "Embedding pipeline completed successfully at $(date)" >> $LOG_FILE
|
|
echo "SUCCESS: Embedding pipeline completed"
|
|
else
|
|
echo "Embedding pipeline failed at $(date)" >> $LOG_FILE
|
|
echo "ERROR: Embedding pipeline failed"
|
|
fi
|
|
|
|
echo "Embedding pipeline finished at $(date)" >> $LOG_FILE
|