A
A
a2019-04-17 22:01:46
bash
a, 2019-04-17 22:01:46

Is it possible to track a pending task (at) using the ps command?

For example, I create a pending task

at 15:30
> cat 1.txt > 2.txt
> <eof>

As far as I know, once a task is created, the process runs in the background.
Once created, is it possible to track this process using the ps command? How to find it in the list?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Shitskov, 2019-04-18
@Zarom

at tasks run only at the scheduled time.
Once a minute, cron checks whether there are commands to run and runs if the scheduled start time has already arrived or has already passed.
The command is used to view the list of tasks atq.
Prior to launch, scripts are stored in /var/spool/atjobs - you can see the contents of the scripts and their launch parameters.

J
jcmvbkbc, 2019-04-17
@jcmvbkbc

Once created, is it possible to track this process using the ps command? How to find it in the list?

By the name? ps -axwill list all processes in the current PID namespace.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question