Legacy Dev Forum Posts

 View Only

Sign Up

Error open data exporter "cron pattern not valid"

  • 1.  Error open data exporter "cron pattern not valid"

    Posted 06-05-2025 18:03

    devkike | 2023-08-09 10:53:28 UTC | #1

    Hello, I am trying to make open data exporter work, and when I go to start node index.js, the error that it indicates, even installing cron, updating it, updating node etc is always the same: cron pattern not valid"

    x:\xxxx\xxxx\xxxx\xxxx\xxxxxx\open-data-exporter\src>node index.js loading config from ./config.json Initializing logger for api at level silly Initializing logger for TemplateDefinitions at level silly Initializing logger for executor at level silly debug: [TemplateDefinitions] Loading standard module "dataOperations" from dataOperations.js debug: [TemplateDefinitions] Loading standard module "datetimeOperations" from datetimeOperations.js Initializing logger for main at level silly (node:19568) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use node --trace-warnings ... to show where the warning was created) verbose: [executor] Configuration successfully dereferenced verbose: [executor] Executor initialized verbose: [main] Running "" at interval "" cron pattern not valid

    Can you help me?

    Thnks


    devkike | 2023-08-09 14:37:41 UTC | #2

    Hello,

    I have already fixed the error, but now how can I see the data in .html?

    Thank you


    tim.smith | 2023-08-10 13:57:11 UTC | #3

    The template you run for the export can export to html. For example: https://github.com/MyPureCloud/open-data-exporter/wiki/example-%7C-call-detail-report


    devkike | 2023-08-14 07:55:57 UTC | #4

    Hola Tim, ya tengo esto solucionado, por otro lado necesito extraer los wrapupcode, pero no consigue extraerlos, es correcto como lo estoy plantenado? const wrapUpSegment = conversation.segments && conversation.segments.find(segment => segment.segmentType === "wrapup"); console.log("WrapUpSegment:", wrapUpSegment); const wrapUpCode = wrapUpSegment?.wrapUpCode || ''; console.log("WrapUpCode:", wrapUpCode);

    thnks


    tim.smith | 2023-08-14 13:48:03 UTC | #5

    Assuming you're working with the response to POST /api/v2/analytics/conversations/details/query, I think your condition is correct, but you're looking in the wrong place. A conversation doesn't directly have segments. Segments are located on the session, so you would need to do something like conversation.participants.find(participant => participant.sessions.find(session => session.segments.find(segment => segment.segmentType === "wrapup")). (I don't think this code does exactly what you're looking for, but hopefully it conveys drilling down to find the segment.)


    Suponiendo que está trabajando con la respuesta a POST /api/v2/analytics/conversations/details/query, creo que su condición es correcta, pero está buscando en el lugar equivocado. Una conversación no tiene segmentos directamente. Los segmentos se encuentran en la sesión, por lo que deberá hacer algo como conversation.participants.find(participant => participant.sessions.find(session => session.segments.find(segment => segment.segmentType === "wrapup")). (No creo que este código haga exactamente lo que está buscando, pero espero que transmita la profundización para encontrar el segmento.)


    devkike | 2023-08-15 09:26:51 UTC | #6

    Hello, finally add the jsonpath library and I was able to map it correctly.


    system | 2023-09-15 09:27:16 UTC | #7

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 21412