Executing Jobs via the Terminal in Unopim


Table of Contents

Executing Jobs via the Terminal in Unopim: A Step-by-Step Guide

Unopim is a powerful tool for managing asynchronous tasks, allowing developers to offload time-consuming operations to background jobs. Executing these jobs via the terminal is a common practice that ensures efficient processing and proper job management. With Unopim’s terminal-based job execution feature, developers can efficiently manage and monitor their background jobs, ensuring that they are executed correctly and in a timely manner. By utilizing terminal-based job execution, developers can ensure that their jobs are executed efficiently and effectively, resulting in faster processing times and improved overall system performance.

This guide outlines how to execute jobs within the Unopim platform using the terminal. This method can be beneficial for automating tasks, integrating with other systems, and performing bulk operations.

Step 1: Create a Job in Unopim

To execute jobs via the terminal in Unopim, the first step is to create a job.

Execute Jobs via Terminal Unopim

Step 2: Retrieve the Job ID and User email id for Use in Terminal Commands

You can execute specific jobs directly using the php artisan unopim:queue:work command, along with parameters like the Job ID and user email ID. Here’s how it works:

php artisan unopim:queue:work {JobId} {userEmailId}

How to Set Up Cron Scheduling

Cron jobs are a powerful way to schedule recurring tasks on Unix-based systems. By using cron scheduling, you can automate tasks such as running export and import above provided command. Here’s a step-by-step guide to setting up cron jobs.

Step 1: Open the Crontab Configuration

To start setting up a cron job, open your crontab file using the following command:

crontab -e

Step 2: Add a Cron Job

Let’s add a cron job that runs a Laravel command every hour. You can schedule tasks by specifying the appropriate interval in the crontab file.

To run a Laravel command every hour, add this line to your crontab:

0 * * * * /path/to/your/project/artisan unopim:queue:work {JobId} {userEmailId}

Step 3: Save and Exit the Crontab

Once you’ve added the necessary cron jobs, save and exit the crontab editor. If you’re using vi or vim, press Esc, then type :wq and hit Enter

Step 4: Verify Cron Jobs

To verify the cron jobs you’ve set up, use the following command:

crontab -l

Unopim is a powerful tool for managing asynchronous tasks, allowing developers to offload time-consuming operations to background jobs. If you’re new to Unopim, check out our guide on setting up queues in Unopim for a solid foundation.


Share this content:

I am a passionate blogger with extensive experience in web design. As a seasoned YouTube SEO expert, I have helped numerous creators optimize their content for maximum visibility.

Leave a Comment