pbs_preempt_jobs(3B)

πŸ“¦ version 23.06.06-unstable-2026-04, in nixos 26.05, nixpkgs unstable

πŸŽ€ NAME πŸŽ€

okay so this is pbs_preempt_jobs(3B) from PBS Professional β€” the little function that preempts a whole list of jobs, bestie. ✨

🌸 SYNOPSIS 🌸

#include <pbs_error.h>
#include <pbs_ifl.h>

int preempt_job_info *pbs_preempt_jobs(int connect, char **jobID_list)

πŸ’– DESCRIPTION πŸ’–

So basically, pbs_preempt_jobs() sends the server a list of jobs to be preempted. That's the whole vibe. 🫢

It sends a Preempt Jobs (93) batch request to the server over the connection specified by connect.

Then it returns a list of the preempted jobs, along with the method used to preempt each one. Iconic, honestly. πŸ‘‘

πŸ¦‹ ARGUMENTS πŸ¦‹

  • connect β€” this is the return value of pbs_connect(). It specifies the connection handle over which to send the batch request to the server. Like, it's literally your little phone line to the server. πŸ“ž
  • jobID_list β€” the list of job IDs to be preempted, as a null-terminated array of pointers to strings. periodt.

Format for a job ID:

<sequence number>.<server name>

Format for a job array ID:

<sequence number>[].<server name>

For example:

                  const char *joblist[3];
                  joblist[0]="123@myserver";
                  joblist[1]="456@myserver";
                  joblist[2]=NULL;

πŸ‘‘ RETURN VALUE πŸ‘‘

Returns a list of preempted jobs. Each job is represented in a preempt_job_info structure, which has the following fields:

  • job_id β€” the job ID, in a char*. πŸ“
  • preempt_method β€” how the job was preempted, in a char:
    • S β€” the job was preempted using suspension.
    • C β€” the job was preempted using checkpointing.
    • R β€” the job was preempted by being requeued.
    • D β€” the job was preempted by being deleted.
    • 0 (zero) β€” the job could not be preempted. 😭

🧚 CLEANUP 🧚

You must free the list of preempted jobs by passing it directly to free().

no cap, bestie β€” don't just leave it there, that's a memory leak and it's not giving main character energy πŸ’€

and that's the whole page, bestie β€” this was pbs_preempt_jobs(3B) from PBS Professional, dated 11 December 2019, and the footer vibes say Local. slay, go preempt those jobs responsibly πŸ’…βœ¨πŸŒˆ

πŸ“¦ where this page comes from