In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "how to do crontab invalid under ubuntu", the content is simple and easy to understand, organized clearly, I hope to help you solve doubts, let Xiaobian lead you to study and learn "how to do crontab invalid under ubuntu" this article bar.
Enable crontab in Debain docker. If there is a problem, handle it for a day. Make a special record. Debain and ubuntu are similar, so they are counted under ubuntu.
1. First question, install crontab
apt-get install cron
See clearly, it's cron, not crond! You don't need to install vixie-cron or anything like that under centos! All kinds of tutorials for centos on the internet really made me miserable! Remember, in ubuntu only one command above is enough!
2. Start crontab service
/etc/init.d/cron status #View status/etc/init.d/cron restart #Start service
View status with ps -ef| Grep cron works, service start cron works. Just remember, cron, not crond! Crond is used for centos.
3. For docker, if you don't use docker, you can skip this step
Modify/etc/pam.d/cron file, change required to sufficient, and restart cron service: /etc/init.d/cron restart
4. Absolute paths must be used in scripts
Whether it's a shell script or a python script, all paths must be absolute!
5. Import the required environment variables
cases
0 8 * * * . /etc/profile; /bin/sh /home/abc/test.sh0 8 * * * /bin/usr/python2.7 /home/abc/test.py
All of this is ok, there should be no problem.
The above is "ubuntu crontab invalid how to do" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.