on 01-08-2022 8:32 AM
Hi experts,
I am working on multi tenant application in which i want to set up a cron job which syncs invoice data from an S4 system through destination. I want this job to run on all tenants on every day on a particular time without needing to trigger the action. Can someone suggest an approach i can take to find a solution
Thanks.
Hi krishnan.jr ,
You can either use the job scheduler service (this will trigger external HTTP requests against the endpoint), or you can use `cds.spawn` to schedule async jobs.
https://cap.cloud.sap/docs/node.js/transactions#cds-spawn
Best regards,
David
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi David,
srv.tx ({ tenant?, user?, … }) → txsrv will work to execute DB requests for the specific tenant. But how does the tenant specific destination lookup work when the job is triggered in the CAP service of the provider account? I think to lookup the S/4HANA destination that is maintained in the subscriber subaccount also the job needs to be started via the approuter URL of the thenant. Or is that something that is controlled by the selectionStrategy that is documented in Destinations and Multitenancy?
Best Regards
Gregor
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.