advpl-jobs-rpc

Community

Run Protheus jobs safely, headless.

AuthorJoniPraia
Version1.0.0
Installs0

System Documentation

What problem does it solve?

It prevents Protheus scheduled jobs and RPC executions from breaking or hanging due to UI calls, missing environment setup, or incorrect connection type/licensing.

Core Features & Use Cases

  • Correct headless JOB entrypoint: Uses Main Function with RpcSetType(3) and explicit RpcSetEnv(...)/RpcClearEnv() lifecycle for background execution.
  • JOB-safe environment handling: Ensures environment is prepared with the right company/branch/module context and supported scheduler mechanisms (appserver.ini, StartJob, FwSchedExec, CallProc, MsRunInThread).
  • Prevents modal/UI deadlocks: Avoids prohibited functions in JOB (e.g., MsgInfo, Pergunte, Help, FwAlertHelp) and replaces them with ConOut/FwLogMsg logging.
  • Production-oriented error logging: Encourages Begin Sequence ... Recover Using oErr ... End patterns to capture failures without user interaction.
  • Use Cases: Batch integrations, cron-like scheduler runs, RPC-triggered background processes, and debugging “job ran but did nothing” caused by interactive calls.

Quick Start

Tell the AI: "Show me a minimal JOB Main Function that uses RpcSetType(3), calls RpcSetEnv with my emp/fil, logs start/end with FwLogMsg, forbids MsgInfo/Pergunte, and ends with RpcClearEnv."

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: advpl-jobs-rpc
Download link: https://github.com/JoniPraia/plugadvpl/archive/main.zip#advpl-jobs-rpc

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.