first commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Cron job script to export Zoho Projects hourly
|
||||
# Add to crontab: 0 * * * * /path/to/cron/hourly_export.sh
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
# Configuration
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
||||
PHP_BIN="${PHP_BIN:-php}"
|
||||
|
||||
# Change to project directory
|
||||
cd "$PROJECT_ROOT"
|
||||
|
||||
# Log start
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Starting hourly Zoho Projects export"
|
||||
|
||||
# Run the export script
|
||||
"$PHP_BIN" scripts/export_projects.php --include-tasks
|
||||
|
||||
# Log completion
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] Export completed successfully"
|
||||
Reference in New Issue
Block a user