Any other alternative to at

classic Classic list List threaded Threaded
29 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Any other alternative to at

Peng Yu
Hi, I'd like to easily schedule jobs using a tool other than `at`.
Directly modifying crontab is not an option as it is too cumbersome.
Does anybody know alternatives to `at`? Thanks.

--
Regards,
Peng

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Chris-8
On Sun, 2018-02-18 at 08:37 -0600, Peng Yu wrote:
> Hi, I'd like to easily schedule jobs using a tool other than `at`.
> Directly modifying crontab is not an option as it is too cumbersome.
> Does anybody know alternatives to `at`? Thanks.
>
I use Webmin on my Gnome box. Very easy to set up cron jobs with it.

--
Chris
KeyID 0xE372A7DA98E6705C
31.11972; -97.90167 (Elev. 1092 ft)
08:49:57 up 5 days, 17:03, 1 user, load average: 2.18, 2.41, 1.72
Description: Ubuntu 16.04.3 LTS, kernel 4.13.0-32-generic

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Ralf Mardorf-5
In reply to this post by Peng Yu
On Sun, 18 Feb 2018 08:37:51 -0600, Peng Yu wrote:
>Hi, I'd like to easily schedule jobs using a tool other than `at`.
>Directly modifying crontab is not an option as it is too cumbersome.
>Does anybody know alternatives to `at`? Thanks.

After re-reading this thread from 2016
https://lists.ubuntu.com/archives/ubuntu-users/2016-August/286654.html
I still don't understand what you try to achieve. Consider to discribe
what you exactly want to do.

Since you are still as vague as possible, I cant resist to post this
link: http://manpages.ubuntu.com/manpages/xenial/man1/sleep.1.html



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Karl Auer
In reply to this post by Peng Yu
On Sun, 2018-02-18 at 08:37 -0600, Peng Yu wrote:
> Hi, I'd like to easily schedule jobs using a tool other than `at`.
> Directly modifying crontab is not an option as it is too cumbersome.
> Does anybody know alternatives to `at`? Thanks.

Could you tell us WHY you don't want to use "at"? Scheduling jobs is
exactly and precisely what it is designed to do!

If the precise time when they run is not important, but they do need to
run regularly, you could drop jobs - any old executables - into
/etc/cron.hourly, /etc/cron.daily/ etc/cron.weekly or
/etc/cron.monthly.

If you need different frequencies, look at how cron runs those jobs,
and set up your own directory and cron job to run the things in it.
Just adding jobs to the directory will make cron run them. If they
should only run once, either make them self-removing, or make your cron
job clear the directory after running everything in it.

This is a bit of work, but only has to be done once.

If you are OK with it being a bit interactive, this sort of thing is
very lo-tech but will run your program an hour later:

    sleep 3600 ; myprog

If you want something pointy-clicky, google it; there seem to be  few
crontab GUIs.

Regards, K.

-- 
> Regards,
> Peng
>

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer ([hidden email])
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: A0CD 28F0 10BE FC21 C57C 67C1 19A6 83A4 9B0B 1D75
Old fingerprint: A52E F6B9 708B 51C4 85E6 1634 0571 ADF9 3C1C 6A3A



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Ralf Mardorf-5
In reply to this post by Ralf Mardorf-5
On Sun, 18 Feb 2018 16:06:30 +0100, Ralf Mardorf wrote:

>On Sun, 18 Feb 2018 08:37:51 -0600, Peng Yu wrote:
>>Hi, I'd like to easily schedule jobs using a tool other than `at`.
>>Directly modifying crontab is not an option as it is too cumbersome.
>>Does anybody know alternatives to `at`? Thanks.  
>
>After re-reading this thread from 2016
>https://lists.ubuntu.com/archives/ubuntu-users/2016-August/286654.html
>I still don't understand what you try to achieve. Consider to discribe
>what you exactly want to do.
>
>Since you are still as vague as possible, I cant resist to post this
>link: http://manpages.ubuntu.com/manpages/xenial/man1/sleep.1.html

Or how about a loop using "date"?

What's the problem with cron and Co.?

IOW the maybe available "alternatives" are likely related to what you
want to do and/or regarding the reason you don't want/cannot use cron
and Co..


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Ralf Mardorf-5
In reply to this post by Karl Auer
On Mon, 2018-02-19 at 02:21 +1100, Karl Auer wrote:
>     sleep 3600 ; myprog

JFTR since my domain is real-time audio, I don't need such delays, but
actually for my old machine with HDDs, my scripts sometimes required to
use delays. For example, to ensure that app A already is ready for
usage, before app B gets started, I used something like "sleep 2". A
pitfall when writing and testing such a script was the cache. Once an
app already was launched one time, "sleep 0.5" died the job, but after a
reboot, when the app wasn't in the cache, this 0.5 seconds delay was too
short, a 2 seconds delay was needed.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Chris Green
On Sun, Feb 18, 2018 at 05:13:55PM +0100, Ralf Mardorf wrote:

> On Mon, 2018-02-19 at 02:21 +1100, Karl Auer wrote:
> >     sleep 3600 ; myprog
>
> JFTR since my domain is real-time audio, I don't need such delays, but
> actually for my old machine with HDDs, my scripts sometimes required to
> use delays. For example, to ensure that app A already is ready for
> usage, before app B gets started, I used something like "sleep 2". A
> pitfall when writing and testing such a script was the cache. Once an
> app already was launched one time, "sleep 0.5" died the job, but after a
> reboot, when the app wasn't in the cache, this 0.5 seconds delay was too
> short, a 2 seconds delay was needed.
>
There are far better methods available than simple timing for this
sort of thing.  Even bash has ways of saying 'execute this only when
that has finished'.

--
Chris Green

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Ralf Mardorf-5
On Sun, 18 Feb 2018 16:34:10 +0000, Chris Green wrote:
>There are far better methods available than simple timing for this
>sort of thing.  Even bash has ways of saying 'execute this only when
>that has finished'.

Assuming you are thinking about "app_A && app_B" and alike, then you are
mistaken, an audio app often already returns exit code 0, before
everything is ready.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Tom H
In reply to this post by Peng Yu
On Sun, Feb 18, 2018 at 9:37 AM, Peng Yu <[hidden email]> wrote:
>
> Hi, I'd like to easily schedule jobs using a tool other than `at`.
> Directly modifying crontab is not an option as it is too cumbersome.

man systemd.timer

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Peng Yu
> man systemd.timer

$ man systemd.timer
No manual entry for systemd.timer

--
Regards,
Peng

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Ralf Mardorf-5
In reply to this post by Ralf Mardorf-5
On Sun, 18 Feb 2018 17:39:24 +0100, Ralf Mardorf wrote:
>On Sun, 18 Feb 2018 16:34:10 +0000, Chris Green wrote:
>>There are far better methods available than simple timing for this
>>sort of thing.  Even bash has ways of saying 'execute this only when
>>that has finished'.  
>
>Assuming you are thinking about "app_A && app_B" and alike, then you
>are mistaken, an audio app often already returns exit code 0, before
>everything is ready.

PS:

Theory often vs praxis, an not audio related example:

$ grep pppoe_off\( -A4 /usr/local/sbin/alice
pppoe_off() {
  echo; poff -a; ip link set enp3s0 down; printf "Progress: "
  while pidof pppd > /dev/null; do printf "."; sleep 3; done;
  echo; modprobe -vr pppoe; echo
}

There might be smarter ways to handle it in praxis (I'm not using this
script anymore), but actually not everything that should work by
theory, does the job in real life.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Peng Yu
In reply to this post by Karl Auer
> Could you tell us WHY you don't want to use "at"? Scheduling jobs is
> exactly and precisely what it is designed to do!

For many many other tasks, there are usually multiple alternatives
that can achieve almost the same things with some variants. For
example, there are different programming languages, or there are
different `ls`.

It looks weird to me that there would be no alternative to `at`.

--
Regards,
Peng

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Ralf Mardorf-5
On Sun, 18 Feb 2018 10:50:38 -0600, Peng Yu wrote:
>> Could you tell us WHY you don't want to use "at"? Scheduling jobs is
>> exactly and precisely what it is designed to do!  
>
>For many many other tasks, there are usually multiple alternatives
>that can achieve almost the same things with some variants. For
>example, there are different programming languages, or there are
>different `ls`.
>
>It looks weird to me that there would be no alternative to `at`.




--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Ralf Mardorf-5
In reply to this post by Peng Yu
On Sun, 18 Feb 2018 10:50:38 -0600, Peng Yu wrote:
>> Could you tell us WHY you don't want to use "at"? Scheduling jobs is
>> exactly and precisely what it is designed to do!  
>
>For many many other tasks, there are usually multiple alternatives
>that can achieve almost the same things with some variants. For
>example, there are different programming languages, or there are
>different `ls`.
>
>It looks weird to me that there would be no alternative to `at`.

Oops, I pushed the wrong button first. My apologies for the emty reply.

Yes, we are aware that there are alternatives. One alternative for e.g.
"ls" is "tree", but "tree" doesn't replace "ls", so the reason why
still requiers some explanation of what you want to achieve.

You still did not describe what you want to do.

>$ man systemd.timer
>No manual entry for systemd.timer

http://lmgtfy.com/?q=systemd.timer



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Ralf Mardorf-5
On Sun, 2018-02-18 at 17:58 +0100, Ralf Mardorf wrote:
> there are different `ls`

Now I need to be nitpicking, since there are at best common aliases for
"ls", non of which I ever would use, but those common aliases still are
using "ls". Again, depending on what you try to achieve "tree" could be
a good alternative for "ls". AFAIK there are _not_ different "ls" unless
you compare the FreeBSD "ls" of an default install with the default
Ubuntu install "ls", they indeed at least differ in the way you could
order options and paths.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Ralf Mardorf-5
On Sun, 2018-02-18 at 18:07 +0100, Ralf Mardorf wrote:
> On Sun, 2018-02-18 at 17:58 +0100, Ralf Mardorf wrote:

Oops, Peng Yu wrote :D:
> > there are different `ls`
>
> Now I need to be nitpicking, since there are at best common aliases for
> "ls", non of which I ever would use, but those common aliases still are
> using "ls". Again, depending on what you try to achieve "tree" could be
> a good alternative for "ls". AFAIK there are _not_ different "ls" unless
> you compare the FreeBSD "ls" of an default install with the default
> Ubuntu install "ls", they indeed at least differ in the way you could
> order options and paths.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Peter Silva
I think 'timing' and *alternative to at* is the wrong approach.  You
need to figure out
how to test if the first app is *ready*, and only fire up the second
once it is.  How to do
so is app dependent.  If could be when a certain named pipe exists? or
perhaps dbus,
or check for a message in a log file.  Once you see the confirmation
that the first component
is running, you start the second one....

it could be a bash loop like:

while [ ! "`tail -100 /where/the/log/is | grep message`" ]; do
    sleep 1
done
start_second_app;




On Sun, Feb 18, 2018 at 12:10 PM, Ralf Mardorf <[hidden email]> wrote:

> On Sun, 2018-02-18 at 18:07 +0100, Ralf Mardorf wrote:
>> On Sun, 2018-02-18 at 17:58 +0100, Ralf Mardorf wrote:
>
> Oops, Peng Yu wrote :D:
>> > there are different `ls`
>>
>> Now I need to be nitpicking, since there are at best common aliases for
>> "ls", non of which I ever would use, but those common aliases still are
>> using "ls". Again, depending on what you try to achieve "tree" could be
>> a good alternative for "ls". AFAIK there are _not_ different "ls" unless
>> you compare the FreeBSD "ls" of an default install with the default
>> Ubuntu install "ls", they indeed at least differ in the way you could
>> order options and paths.
>
>
> --
> ubuntu-users mailing list
> [hidden email]
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Ralf Mardorf-5
On Sun, 18 Feb 2018 13:16:02 -0500, Peter Silva wrote:
>I think 'timing' and *alternative to at* is the wrong approach.  You
>need to figure out how to test if the first app is *ready*, and only
>fire up the second once it is.

You are confusing the OP's vague request, with an off-toppic/JFTR
statemen I made ;).


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Ralf Mardorf-5
In reply to this post by Peter Silva
On Sun, 18 Feb 2018 13:16:02 -0500, Peter Silva wrote:
>while [ ! "`tail -100 /where/the/log/is | grep message`" ]; do
>    sleep 1
>done
>start_second_app;

Or you simply replace such nonsense by

  sleep 2

;), since it not necessarily is possible to universal find a term you
could grep, but it much often always works, when just adding a delay.
Instead of "2" use a variable, just in case the script should work on
your friends 25 years old machine, too, by simply increasing the
variable for this value.

I already gave an example were such a loop is useful, however, those
loops include "sleep" and while my example isn't tricky, based upon a
PID, you example is tricky, since you assume that there is some constant
term you could grep, by some output you expect.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: Any other alternative to at

Ralf Mardorf-5
On Sun, 18 Feb 2018 19:42:06 +0100, Ralf Mardorf wrote:

>On Sun, 18 Feb 2018 13:16:02 -0500, Peter Silva wrote:
>>while [ ! "`tail -100 /where/the/log/is | grep message`" ]; do
>>    sleep 1
>>done
>>start_second_app;  
>
>Or you simply replace such nonsense by
>
>  sleep 2
>
>;), since it not necessarily is possible to universal find a term you
>could grep, but it much often always works, when just adding a delay.
>Instead of "2" use a variable, just in case the script should work on
>your friends 25 years old machine, too, by simply increasing the
>variable for this value.
>
>I already gave an example were such a loop is useful, however, those
>loops include "sleep" and while my example isn't tricky, based upon a
>PID, you example is tricky, since you assume that there is some
>constant term you could grep, by some output you expect.

Let alone that my loop handles an exit (usually less critcial than a
start) and you try to handle a start.

Google for audio session scripts and you'll see that "&& sleep $foo" is
the common way to go, for good reasons.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
12