News:

SMF - Just Installed!

Main Menu

tittle

Started by pathra, Jul 31, 2023, 01:10 PM

Previous topic - Next topic

pathra

COMMAND - DATE

Here is an example: (run this file at 10am, on December 24th)
Code:
at -f /usr/local/bin/reboot.pl 14:45

where reboot.pl contains
Code:
#!/usr/bin/perl
`shutdown -r now`;

Fancy things you can do with `at`.

You can get an email when the task is run by using
-m

You can change the shell that executes the job
-c -k -s (C, Korn, Bourne)

You can specify a file that contains the command to run
-f
Code:
at -f /usr/local/bin/reboot.pl 14:45
You can list the commands that `at` has in its queue
-l
Code:
at -l

You can cancel a pending `at` job
-r
Code:
at -r 9