The CreatorCon Call for Content is officially open! Get started here.

Scheduled Import "run after Parent" with Condition

Meloper
Kilo Sage

Hay,

i have a scheduled Import with a Condition.

I i use this without the Option run after Parent, it works an runs only on Friday

answer = checkTime();

function checkTime() {
    // should only run on Friday after Comparex Data - Load
    var gdt = new GlideDateTime();
    if ((gdt.getDayOfWeekLocalTime() == 5)) {
        gs.log("SAM Software Global SCCM Data - Load: Scheduled Job will be started!");
        return true;
    }
    gs.log("SAM Software Global SCCM Data - Load: Scheduled Job does not start today!");
    return false;
}

 

But now it has to be sure the this Import runs only after an other Import.

The Problem now is that always the Parent is complete (Parents runs daily), this Import runs also.

Why does this condition does not work with the Option run after Parent.

It should ran after Parent, but only on Friday.

1 ACCEPTED SOLUTION

Ashutosh Munot1
Kilo Patron
Kilo Patron

HI,

The condition will be skipped if run after parent is selected.


Thanks,
Ashutosh

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I believe since there is dependency of this import on Parent it ignores the condition and will directly run it once parent is complete.

Needs to be checked if this is OOB behavior.

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar  : Will 'Execute pre-import script' works in this scenario?

Ashutosh Munot1
Kilo Patron
Kilo Patron

HI,

The condition will be skipped if run after parent is selected.


Thanks,
Ashutosh

@Ashutosh Munot1 : Will 'Execute pre-import script' works in this scenario??