Exam EX200 All QuestionsBrowse all questions from this exam
Question 4

SIMULATION -

Configure a task: plan to run echo hello command at 14:23 every day.

    Correct Answer:

    To configure a task to run the 'echo hello' command at 14:23 every day, you would use the cron job scheduler in Linux. The correct steps are as follows: 1. Open the cron job editor by running 'crontab -e'. 2. Add the line '23 14 * * * /bin/echo hello' to the file. This line schedules the 'echo hello' command to run at 14:23 every day. The fields in the line represent: minute (23), hour (14), day of the month (*), month (*), and day of the week (*). 3. Save the file and exit the editor. 4. To verify the scheduled cron job, you can run 'crontab -l'.

Discussion
surac

crontab -u mary -e 23 14 * * * echo "Hello World."

datboy16

why are u user mary? this that necessary

Mayowa15

there is no user for this question so no need to use -u and any user.

PENNSHARK

vim /etc/crontab 23 14 * * * echo "hello "

2022G

#crontab -e 23 14 * * * echo "hello" :wq! #crontab -l =>to check the cronjob

DANG257315

crontab -e "open editor vi" --> key i insert text 23 14 * * * echo "test" save --> esc :x

[Removed]

echo '23 14 * * * /bin/echo hello' | crontab -

Rahul95

crontab -e min hr * * * /bin/echo "hello" crontab -l #to verify vi /etc/cron.deny #to stop a user from creating a cron job username #add the username in the file

zqc

23 14 * * * echo "hello" can't display hello on terminal. should force echo "hello" > /dev/pts/0(may different to your tty). I test on RockyLinux Rocky Linux 8.4 (Green Obsidian). Please correct if I am wrong.

cloudsinair

Question doesn't ask to echo on specific terminal, user could be log in to tty2 or pts/0. to make it simple, don't add more input.

AbidBajwa

23 14 * * * user echo "hello"