Score:0

how to running script bash with time and date time?

us flag

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

Artur Meinild avatar
vn flag
You want to run a specific script on a specific time? Then `cron` is the most tested solution.
Artur Meinild avatar
vn flag
Does this answer your question? [How do I set up a Cron job?](https://askubuntu.com/questions/2368/how-do-i-set-up-a-cron-job)
Score:0
tr flag

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
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.