richmondgozarin / lwc-scheduler-service

A set of utilities for scheduling Apex jobs from Lightning Web Components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LWC Scheduler Service

Recently, I was building a Salesforce Labs App that required me to enable a user to schedule an Apex job from the UI. I quickly realized I didn't know enough about the process and found a lack of information about the topic. I've written a basic overview of how to manage scheduled jobs from the UI and give your apps a bit more setup capability.

Video Overview

Features

The app demonstrates:

  • Array Destructuring
  • Template Literals
  • Scheduling Apex Jobs
  • Aborting Scheduled Jobs
  • Checking Schedule Job Status

Installing LWC Scheduler Service using a Scratch Org

  1. If you haven't already done so, authorize your hub org and provide it with an alias (myhuborg in the command below):

    sfdx force:auth:web:login -d -a myhuborg
    
  2. Clone the repository:

    git clone https://github.com/schandlergarcia/lwc-scheduler-service
    cd lwc-scheduler-service
    
  3. Create a scratch org and provide it with an alias (lwc-scheduler in the command below):

    sfdx force:org:create -s -f config/project-scratch-def.json -a lwc-scheduler
    
  4. Push the app to your scratch org:

    sfdx force:source:push
    
  5. Open the scratch org:

    sfdx force:org:open
    
  6. Create a remote site setting

Navigate to Setup > Remote Site Settings > Add a remote site setting for your community url

About

A set of utilities for scheduling Apex jobs from Lightning Web Components

License:Creative Commons Zero v1.0 Universal


Languages

Language:JavaScript 44.4%Language:Apex 30.4%Language:HTML 25.2%