Schedule job not running but the code is working when executed from background scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2024 06:51 AM
Hi team,
I am facing this issue, I have a scheduled job configured to map country field from subscription id through properties file. The schedule job is not running but the same code works when I am running from background script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2024 07:01 AM
Is the scheduled job in the Global scope? Are you running it as the system account or an admin?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2024 07:04 AM
it is in global scope and running as system account
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2024 08:23 AM
Try adding some logs to confirm the script is running, see how far it gets, and the values assigned to script variables. Then you'll see which if conditions are not being met, or where it is going wrong.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2024 07:49 AM
hi @Shrutij11
- Ensure scheduled job has the necessary permissions to access the tables and fields being modified.
- Scheduled jobs might run before the properties are properly loaded or updated. Since you’re retrieving mappings from the system properties (gs.getProperty), it’s worth checking if the properties are accessible at the time the job runs.
- Put logs and check, if the property values are null or missing in the logs, check if the scheduled job is running before the properties are set.
After the scheduled job runs, review the System Logs under System Logs > All for any potential errors or warnings that could indicate why the job isn't executing as expected.
I hope my answer helps you to resolve your issue, if yes please mark my answer helpful and correct.
thank you
rajesh