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

@Meloper 

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.

If not, please let us know if you need some more assistance.

Regards
Ankur

 

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

Ankur Bawiskar
Tera Patron
Tera Patron

@Meloper 

Hope you are doing good.

Let me know if I have answered your question.

If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.

If not, please let us know if you need some more assistance.

Regards
Ankur

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