cron task
#1
Tue, 2018-01-09 12:38
remy_dev
-
- Offline
- 2 months 3 days ago
- 2017-12-10
Hi,
I try to understand good practices with alpine regarding cron tasks.
I can't find any documentation concerning the organization of cron tasks.
I understand that general tasks can be deposited in the /etc/periodic folder.
But for tasks that I want to execute more precisely, with a specific user I don't understand.
there is the /etc/crontabs folder with a file "root"
So if I want to change the user I have to create a file with the user name?
With debian the format is
5 3 * * * * username /usr/bin/apt-get update
It's not very clear for me
Thanks
It's a crond from BusyBox. Yes, you need to create a separate file named after user's name. Its format self-describes file /etc/crontabs/root (I provided below). Instead "run-parts /etc/peridoic…" write your command.
Thanks,
IT's what i tried, but nothing append
I'm gonna do some research on busybox.
My test file
The same file in root file work
It's just a echo "Hello" >> test.txt
Edit :
A reboot my system and it's work now ...
I guess there's a command to read the files in /etc/crontabs ant it's done when the systeme start
Thanks
sudo service crond restart
should helps doing it without restarting whole system.