task : write a script in Linux that every quarter of every hour generates a Test directory with a Test file

tibi

New Member
Joined
Jan 26, 2023
Messages
5
Reaction score
0
Credits
34
Hello,
I've just started a new job, it's my first contact with Linux and I have this task, for learning.
So far I've learn that command line 15 * * * * -in crontab, schedule the script, but I have problems with the command lines from script

#!/bin/sh
mkdir /Test
touch /Test/Test.txt

15 * * * * /Test/Test.txt

any suggestion?
 


Well, first it looks like you aren't calling crontab. I can't tell by your listing whether that crontab command is in the script or not, and the crontab command itself needs something to execute. What is your script called?
Also, I would suggest going over this article by one of our members:
How to ask a Good Support Question
 
15 * * * * /Test/Test.txt

The syntax of your crontab is incorrect. You probably want something like...

*/15 * * * *
 
What are the permissions on "Test"? Who owns this directory?
Does your script run manually? ( without cron )
 

Members online


Latest posts

Top