- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2020 12:20 AM
We had a scheduled Export export which used to export all the incident table data daily at 6.00 am
so I have unchecked "Appended Timestamp" so every time new data will replace in the MID Server..
For first time export all the records, but from second time only new records need to export...so this I can do by taking records which are updated last 24hrs...but here my issue is for saturday and sundays records...because in those two days the end users will not take data from the mid server..
so can any one suggest some alternative for this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2020 01:58 AM
Yes if they don't pick it up then they will miss as the file doesn't have timestamp and it will get overridden.
So now you have 3 approaches here
1) Inform them to pick the files on Saturday and Sunday as that is by their requirement that they required daily files to be pushed for records updated in last 24hrs
OR
2) Append timestamp so that file doesn't get overridden
OR
3) Approach 3
a) Don't run your existing Scheduled Data Export on Saturday and Sunday using the Condition script
b) Create fresh Scheduled Data Export and make it run Daily; This would only run on Saturday.
Create fresh export Target for this and create Folder for Saturday Export and give that path
You can handle this via Condition Script.
c) Create fresh Scheduled Data Export and make it run Daily; This would only run on Sunday.
Create fresh export Target for this and create Folder for Sunday Export and give that path
You can handle this via Condition Script.
Easiest approach is 1st or 2nd But check with your client and business team on this
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2020 12:16 AM
Hi
Okay, I will try with the above code but I had a doubt that...
For Scheduled Export in Run As I am using admin for which timezone was "europe/stockholm"
Is there any conflict due to this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2020 01:10 AM
Hi
I have just checked ur recent code, but didn't configured in my instance..
My doubt is based on that code...I think we will get day[which runs from 1 to 31] hope it will not get my solution..
can I use the below function?
gdt.getDayOfWeekLocalTime()
and can you please clarify...my last doubt[timezone issue]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2020 05:55 AM
Hi,
Sorry for the confusion
You have to use gdt.getDayOfWeekLocalTime()
Also for the timezone -> system will use the timezone of the Run as User when script in condition runs
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2020 08:00 AM
Sorry to ask you again
My doubt is...
By Using GlideDateTime()..I will get date and Time of "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2020 08:44 AM
Hi,
If your Run as User has Europe/Stockholm that should be fine
When you use gdt.getDayOfWeekLocalTime() it would give time in local timezone and not GMT
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader