function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kaiji shenkaiji shen 

Schedule job permission

I am going to schedule a job in our production env.
What it does is to assign opportunity owner to current owner's manager if the Opportunity has no activities for the past 5 days.

Since it is production env, our product manager will change my profile to a admin to run the job. After I set the shedule job, my profile will become devopler which does not have much access and basically not able to change Opportunity Owner.

My question is, when scheduled job runs everyday, does it still based on my current profile? Or it does not matter what my profile is.
 
Best Answer chosen by kaiji shen
Balaji Chowdary GarapatiBalaji Chowdary Garapati
@kaiji shen,

   The job runs on the user context who scheduled the job, in other words the current permissions of the user that scheduled the  the job will be considered. So, it is advisable to login as your product manager and schedule the job, since he will have system admin rights in prod ever time.

My recommendation would be, create an user just to run the batch jobs who have highest level of access to the data any time, use those credentials to run all kinds of jobs, even though user license cost is involved in this, it would be the ideal way to go.


Hope it helps.,

thanks,
Balaji

All Answers

Balaji Chowdary GarapatiBalaji Chowdary Garapati
@kaiji shen,

   The job runs on the user context who scheduled the job, in other words the current permissions of the user that scheduled the  the job will be considered. So, it is advisable to login as your product manager and schedule the job, since he will have system admin rights in prod ever time.

My recommendation would be, create an user just to run the batch jobs who have highest level of access to the data any time, use those credentials to run all kinds of jobs, even though user license cost is involved in this, it would be the ideal way to go.


Hope it helps.,

thanks,
Balaji
This was selected as the best answer
kaiji shenkaiji shen
Thanks so much for your answer.