ldap_sync_users as cronjob
See original GitHub issueHi,
I’m currently trying to make the ./manage.py ldap_sync_users
a cronjob within a docker container so the application im builing gets synced every x hours.
My problem however is that the command wont execute through the cronjob, also I’m well aware this might not be the proper place to ask since the issue lies most likely within cron but I don’t know where else to ask.
If I run any other ./manage.py
command like migrate
or whatsoever it gives me output and tries to actually do stuff however on ldap_sync_users
nothing is happening.
If I run the command by hand within the container everything works like a charm so the problem is within cron I guess.
Anyone have experience with this?
Regards,
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
How to Configure LDAP Sync With CronJobs in OpenShift
Finally, we can set up the CronJob configuration that will perform the groups' synchronism. Before creating CronJob, it is necessary to gather ...
Read more >openshift-management/cronjob-ldap-group-sync.yml at master
Set of maintenance scripts & cron jobs for OpenShift Container Platform - openshift-management/cronjob-ldap-group-sync.yml at master ...
Read more >LDAP Sync - Snipe-IT Documentation
You can set up a cron to automatically sync LDAP users using the following: location and location_id are optional. So for example, if...
Read more >Activating cron tasks to synchronize data - IBM
Specify a schedule for the cron task and save the changes. Allow the cron task run to synchronize all the users and groups...
Read more >Automatic Ldap Sync/Import using cron job for community ...
Is there possible to automatically sync Ldap with processmaker and import all the user at regular interval of time using cron job for ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I finally made some progress. there was error output, it was just not being redirected right.
&>>
doesn’t work within crontab, maybe because itssh
instead ofbash
?by correctly redirecting output with
1> /var/log/cron.log 2> /var/log/cron.err
I finally got the error messageLDAPOperationsErrorResult
now its just a matter of supplying cron with the correct ENV vars.thanks for the help guys! this issue can be closed 😃
Huh. I’m afraid that I have absolutely no idea why ldap_sync_users might behave differently in cron vs run manually.
If you get to the bottom of this, please let us know what the problem/solution was!
(It’s a good point about getting a “real” scheduler in early rather than later. I guess it’s just cost/benefit based on easy setup with cron, vs time to port over to something else if requirements outgrow cron. The tradeoff point will depend heavily on the sort of project you’re writing regularly. My projects exist in a space where celery is either far too much, or far too little!)
On Mon, 26 Aug 2019 at 12:42, Rick Suijkerbuijk notifications@github.com wrote: