I wanted to set the cron
in Itamae, but there were no cron
resources and there was no documentation on what to recommend, so I looked at the Twitter tweets and set the following job under the name.d/my_task
.
15*** echo hoge>/var/log/hogehoge.txt
Can't cron.d
automatically load files in cron.d
?
Also, is it better to define resources for cron
by yourself like This site
When I wrote what I tried, the question got a little distracted, but what I want to know is, "How do I set cron
in Itamae?"
It may not be a good idea, but I am rewriting the cron entity file.
template "root cron set" do
path"/var/spool/cron/root"
source "templates/var/spool/cron/root.erb"
owner "root"
group "root"
mode "644"
end
/etc/cron.d/
The following is the system cron configuration, and the running user must be listed.This is what the man of crontab says in the following parts:
Each line has five time and date fields, followed by a user name if
This is the system crontab file, followed by a command.
Crontab is looking for a user named echo
.With this setting (if you want to run it on root), you should write /etc/cron.d/my_task
as follows.
15***root echo hoge>/var/log/hogehoge.txt
581 PHP ssh2_scp_send fails to send files as intended
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
912 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
© 2024 OneMinuteCode. All rights reserved.