i want to run script.sh with detail time.
for example i want to run script.sh at 15:20 with date 05-01-2023 , how is the command ? please help, I am confused with this problem
i want to run script.sh with detail time.
for example i want to run script.sh at 15:20 with date 05-01-2023 , how is the command ? please help, I am confused with this problem
You can also use the at
command
# To schedule a one time task: at <time> <command 0>... Ctrl-d# <time> can be either now | midnight | noon | teatime (4pm) HH:MM now + N <minutes | hours | days | weeks> MM/DD/YY
# To list pending jobs: atq
# To remove a job (use id from atq): atrm <id>
tldr:at # at # Execute commands once at a later time. # Service atd (or atrun) should be running for the actual executions. # More information: <https://manned.org/at>.
# Execute commands from standard input in 5 minutes (press
Ctrl + D
when done): at now + 5 minutes# Execute a command from standard input at 10:00 AM today: echo "./make_db_backup.sh" | at 1000
# Execute commands from a given file next Tuesday: at -f path/to/file 9:30 PM Tue
cron
is the most tested solution. – Artur Meinild Jan 04 '23 at 07:46