Questions tagged [scheduling]

A technique for scheduling tasks to be run at a specific time or on a specific event.

Filter by
Sorted by
Tagged with
12
votes
2answers
14k views

Bash Script on Startup? (Linux)

Is there any way to make/run a bash script on reboot (like in Debian/Ubuntu for instance, since thats what my 2 boxes at home have) Also, any recommended guides for doing cron jobs? I'm completely ...
7
votes
1answer
5k views

controlling priority of applications using cgroups

I would like to understand cgroups better and would like to understand the use-cases for applying cgroups. Are cgroups a good way for prioritizing different applications (i.e, giving higher priority ...
15
votes
2answers
21k views

How to enable and use the BFQ scheduler?

I just installed Linux kernel version 4.12 on Ubuntu 17.04 using ukuu (Ubuntu Kernel Update Utility https://doc.ubuntu-fr.org/ubuntu_kernel_upgrade_utility). The thing is, when I check the available ...
6
votes
2answers
14k views

Which process scheduler is my linux system using?

I'm not quite sure if stackoverflow or serverfault is the forum to use for this question, but ill try here. Is there some command I can use or a file I can check in order to find out which process ...
166
votes
9answers
361k views

Where are cron errors logged?

If I setup cron jobs incorrectly they appear to silently fail. Where should I look for an error log to understand what went wrong?
42
votes
3answers
134k views

How to shutdown Linux at a specific datetime from terminal?

It seems I can shutdown using sudo shutdown by specifying a time or minutes. Is there a way to specify datetime for shutdown?
1
vote
3answers
372 views

What's the advantage of mere Ansible on mere shell-scripting if one doesn't use communally-maintained Ansible-Galaxy roles? [closed]

I establish a LAMP with a few extras on a remote Debian machine with a similar shell (Bash) script: #/bin/bash apt update -y apt upgrade ufw sshguard unattended-upgrades wget curl git zip unzip tree ...
188
votes
3answers
475k views

How can get a list of all scheduled cron jobs on my machine?

My sysadmin has set up a bunch of cron jobs on my machine. I'd like to know exactly what is scheduled for what time. How can I get that list?
23
votes
1answer
27k views

Real time processes scheduling in Linux

I have been learning some scheduling concepts. Currently my understanding so far is as below. There are real time processes and non real time processes. Non real time processes can have nice values ...
20
votes
1answer
7k views

How is nice working?

sched_setscheduler says : All scheduling is preemptive: if a process with a higher static priority becomes ready to run, the currently running process will be preempted and ...
19
votes
4answers
16k views

Is there a way to auto turn-on Linux machine?

I know that there are many ways to auto-shutdown, but I'm concerned about auto turn-on. Is there a command or a small piece of software to turn on the system at given time?
10
votes
1answer
4k views

How can you schedule a computer to boot at a specific time?

Usually BIOSes have an option to schedule a time to which to boot at. Is there a Unix/Linux interface to specify the scheduled boot?
3
votes
3answers
4k views

Bash while loop and reading from pipe

I have a Windows command-line program that I'm running in a Bash script in Ubuntu via wine. The Bash script basically looks like this: wine myprogram.exe | while read line do # Process line done ...
15
votes
2answers
2k views

What is a simple way to schedule a single event to happen at some time in the future?

There are often times that I want my computer to do a single task, but not right now. For example, I could have it notify me in 30 minutes that it is time to leave work. Or maybe I want it to run a ...
15
votes
3answers
1k views

What was the reason of the non-preemptivity of older Linux kernels?

Why did the first Linux developers choose to implement a non-preemptive kernel? Is it to save synchronization? As far as I know, Linux was developed in the early '90s, when PCs had a single processor....
18
votes
2answers
20k views

Run script every 30 min with systemd

I would like to execute a script every 30 min after booting into the system. I know you can use cron, but I don't plan to use this feature often therefore I'd like to try it with systemd. So far I ...
11
votes
1answer
2k views

Why can a system become unresponsive?

I just executed dot (a program for drawing directed graphs) with an input file that was so big that it couldn't be rendered in a reasonable amount of time. My whole system froze. I could barely make ...
25
votes
1answer
4k views

High CPU usage with CFS?

I asked a previous question to try and isolate the source of an increase in CPU usage when moving an application from RHEL 5 to RHEL 6. The analysis that I did for that seems to indicate that it is ...
19
votes
1answer
7k views

How do I view the IO priority of a process?

How can I view the IO priority of a process? like to see for example if something has been ionice-ed.
8
votes
2answers
9k views

How can you determine which process scheduler is being used? [duplicate]

I.e. is it the O(1) scheduler, the CFS scheduler, or an older one?
4
votes
1answer
3k views

Are time interrupts always followed by a scheduler call?

When a timer interrupt occurred the ISR is called to service the interrupt. Is it okay to assume that every timer interrupt ends with a call to the scheduler on which process should continue running ...
14
votes
2answers
40k views

What does “INFO: task XXX blocked for more than 120 seconds” exactly mean on Linux?

I had this message in my kernel log : INFO: task XXX blocked for more than 120 seconds. I would like to know what it means technically: under what conditions does the kernel display this message about ...
9
votes
4answers
2k views

How to prevent atd from running past jobs?

The at daemon is a great tool! However, if a job is scheduled for 8:00 am and the machine is off at that time, at will run the job whenever the machine is booted. What I would like to do is stop it ...
9
votes
1answer
6k views

Isolating cause of higher CPU usage on RHEL 6 vs RHEL 5

I'm currently looking to move our system from RHEL 5 to RHEL 6, but I've run into a snag with unexpectedly high CPU usage on the RHEL 6 machines. It appears that this may be due at least in some part ...
4
votes
1answer
354 views

Why is nice-level ignored? (Between different login sessions — honoured if started from same session.)

When I start two CPU-eating processes with different nice-level, e.g. Process 1: nice -19 sh -c 'while true; do :; done' Process 2: sh -c 'while :; do true; done' (I changed the order of : and ...
4
votes
2answers
5k views

chrt(): “failed to set pid XXX's policy” on one machine, but not others

I have several Linux machines, all of them running the same kernel (Ubuntu 12.04, 3.5.0-45-generic). On one of them, I am unable to use chrt at all. If I attempt to use it on a new process, I get the ...
3
votes
2answers
2k views

How can I queue processes?

I have a surveillance camera and a program records videos when motion is detected. Basically, this program saves the video in a very heavy format. My solution was to call a script that converts the ...
3
votes
1answer
7k views

How to schedule shutdown every day?

We have a server that is used for Linux thin clients in a class. The server is started when required and I want to schedule it to power off at 22:00 every day to avoid power wasting. I thought of ...
2
votes
1answer
1k views

Kubuntu 18.04, cron task does not load @reboot

I am running Kubuntu 18.04, and have a simple script to reset the plasmashell every time after suspend/lockscreen since there's a known bug that corrupts folder/file names upon returning from suspend. ...
3
votes
2answers
3k views

Run a command at a certain time in cygwin

I am writing a bash (.sh) script for cygwin. I want to run a certain command at specific time. I tried the following: echo "test" | at 19:00 but I get the following error: The AT command has been ...
1
vote
2answers
460 views

How does the kernel scheduler know how to pre-empt a process?

As far as I understand, the kernel is not a process, but rather a set of handlers that can be invoked from the runtime of another progress (or by the kernel itself via a timer or something similar?) ...
0
votes
1answer
523 views

How to troubleshoot failing cron job

I have a crontab root file that looks like this: lab-1:/var/www/cdd# crontab -l # do daily/weekly/monthly maintenance # min hour day month weekday command * * * * *...
0
votes
1answer
228 views

Cron job for 7 days alone not followed by multiple weeks

I need to execute a cronjob to run once for 7 days alone. I have tried like this: 0 0 * * 0-6 myscript.sh It gets run for once a day and running every day of the week since I gave as 0-6. But I ...