34 lines
1.3 KiB
Bash
34 lines
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
# Setup script for embedding pipeline cron job
|
|
# This script configures the cron job to run the embedding pipeline periodically
|
|
|
|
echo "Setting up embedding pipeline cron job..."
|
|
|
|
# Get the directory where this script is located
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
echo "Script directory: $SCRIPT_DIR"
|
|
|
|
# Create cron job entry - this will be run on the server
|
|
# The actual cron job should be added manually on the server
|
|
echo "To set up the cron job on the server, please add the following line to your crontab:"
|
|
echo ""
|
|
echo "*/10 * * * * cd $SCRIPT_DIR && ./run_embedding_pipeline.sh"
|
|
echo ""
|
|
echo "You can edit crontab by running: crontab -e"
|
|
echo ""
|
|
echo "Or add it directly using: (crontab -l 2>/dev/null; echo '*/10 * * * * cd $SCRIPT_DIR && ./run_embedding_pipeline.sh') | crontab -"
|
|
echo ""
|
|
echo "The pipeline will run every 10 minutes."
|
|
echo ""
|
|
echo "To view current cron jobs: crontab -l"
|
|
echo "To remove cron job: crontab -l | grep -v 'embedding' | crontab -"
|
|
|
|
# Make the pipeline script executable
|
|
chmod +x "$SCRIPT_DIR/run_embedding_pipeline.sh"
|
|
|
|
echo "Pipeline script made executable"
|
|
echo ""
|
|
echo "Setup complete! Please add the cron job manually on your server:"
|
|
echo "*/10 * * * * cd $SCRIPT_DIR && ./run_embedding_pipeline.sh"
|