CD2 DAP - scheduling syncdb with cron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have everything working as I would like. Postgres has all the schema and tables and I can successfully run the syncdb on all the tables in Terminal (I am on a mac). I would like to schedule the syncdb with cron but I have hit a wall. Right now the error is that dap is not available or found. Anyone sucessfully using cron to automate the syncdb?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No problems here (outside of the occasional DAP service issue). Been running a CRON job for years on this. I wrap the DAP client in a Bash script (linux). Here is the latest iteration of this process allowing you to do everything through arguments: https://github.com/reynlds-illinois/enterprise_learning_systems/blob/main/canvas_data_2/cd2.sh
Adding the "-l" switch on the shebang line helps!
Here is the line in crontab for performing a sync with error-level logging. It kicks off every 6 hours 6 days a week:
05 00,06,12,18 * * 0-5 /var/lib/canvas-mgmt/bin/cd2.sh syncdb error