Is there a way to temporarily increase the priority of cron's batch queue?


 
Thread Tools Search this Thread
# 1  
Is there a way to temporarily increase the priority of cron's batch queue?

I run an application where some component periodically submits jobs into cron's batch queue via the 'batch' command.
Each of these jobs perfoms a query to retrieve some data from a database, builds up an openoffice document with that data, and submits it to a headless openoffice server to have it printed. It is important that the jobs be executed in a FIFO way to keep the documents coming out at the printer in the specific order they were submitted.
AFAIK the batch queue is given a low priority, meaning (more or less) that it will only submit the next job when the CPU is not busy. This is mostly OK with me, but at certain times when my server gets very busy, the jobs waiting in the batch queue get starved and this can eventually be very problematic. In such cases, it would be great to have an easy way to temporarily give the batch queue a higher priority to get those jobs through. Or maybe move the jobs to a higher priority queue without losing the FIFO sequence.
When I was building this in the first place, I tested submitting to the batch queue an to other queues with the 'at' command, but only the batch queue seemed to keep FIFO, so I stuck with that.
I have been looking at open 'Job scheduling' packages out there (OpenPBS, Torque, SLURM...) but these seem completely overkill for my needs (they seem to be designed to run in cluster environments, they have all kinds of fancy scheduling/sequencing/paralleling options, etc.).
I would just like to keep it as simple as possible. I run everything in just a single server, and the 'at' and 'batch' commands seemed to be exactly what I needed, except in some cases I really need to be able to change the priorities of the jobs that I have already submitted into the queue.
BTW this is all in a Linux box.
# 2  
You need the renice command. It lets you change the priority of one process (or more).

You have to be superuser (root) to use the command to increase priority
# 3  
isn't renice meant for processes instead of jobs?

Correct me if I'm wrong, but I thought renice was meant for processes, not jobs. What I have in the batch queue are jobs, not processes.
# 4  
There is no easy way to do what you are looking to do using the cron/at/batch facility.
 

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Science: Mathematics
Difficulty: Medium
The Pythagorean theorem states that the square of the hypotenuse is equal to the product of the squares of the other two sides.
True or False?

8 More Discussions You Might Find Interesting

1. HP-UX

glance global priority queue question

Hello; I am collecting global priority queue data from the following script: /opt/perf/bin/glance -j2 -iterations 10 -adviser_only -syntax /home/dsljseo/glance.syntax cat glance.syntax print "global priority queue", gbl_pri_queue The typical output: global priority... (1 Reply)
Discussion started by: delphys
1 Replies

2. Shell Programming and Scripting

Executing a batch of files within a shell script with option to refire the individual files in batch

Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below. I am on a solaris server btw. Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose. ... (2 Replies)
Discussion started by: goddevil
2 Replies

3. Solaris

Increase processs priority and affinity in Solaris

I want to know how can in Solaris i can: >Set Process priority to maximum >Set Process Affinity. Linke in windows task manager we can set process priority to following levels: Low, Below Normal,Normal , Above Normal , High , Realtime And we can set process affinity to run on all processors.... (10 Replies)
Discussion started by: mr_os
10 Replies

4. Solaris

Increase /tmp size temporarily

Hi all system Solaris 10 10/09 s10x_u8wos_08a X86 ufs file system I would like to install SunStudio. After the gui comes up it shows that i need to add swap space of at least 900m. the command swap-s shows 880m free. My question is can you temporarily increase swap by 1 or 2... (3 Replies)
Discussion started by: kc2dws
3 Replies

5. Shell Programming and Scripting

Can is set permissions temporarily?

I want to do just what the title says. Here's why: I am adapting a script that backups to a mount. In the script it has a catch where if the drive isn't RW then it unmounts and attempts to remount RW. # attempt to remount the RW mount point as RW; else abort $MOUNT -o remount,rw... (3 Replies)
Discussion started by: Movomito
3 Replies

6. AIX

how to block a user temporarily?

hi to all i'm a newbie on aix. how would i block temporarily a few users in accessing our aix server so that other users may not be affected by th cpu usage...because if all of them accessing our server the CPU utilization goes high... thanks winky (3 Replies)
Discussion started by: winky
3 Replies

7. UNIX for Dummies Questions & Answers

temporarily stop cron services

hi can i know what is the command and in which directory to temporarily stop the cron service of my server? here is my server information thanks SunOS statsfs07 5.8 Generic_117000-03 sun4u sparc SUNW,Ultra-4 (1 Reply)
Discussion started by: legato
1 Replies

8. UNIX for Dummies Questions & Answers

Cron message queue problem

I have a problem with running jobs out of cron on Solaris 8. Initially when one of the users on the box (other than root) attempted to save the crontab after modification by using "crontab -e", the message "Crontab: cannot open the crontab file in the crontab directory" was given. I then... (7 Replies)
Discussion started by: mattd
7 Replies

Featured Tech Videos