<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>cron on Shaowen Chen's Website</title><link>https://www.chenshaowen.com/en/tags/cron/</link><description>Recent content in cron on Shaowen Chen's Website</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>&amp;copy;2016 - {year}, All Rights Reserved.</copyright><lastBuildDate>Thu, 26 May 2022 00:00:00 +0000</lastBuildDate><sy:updatePeriod>weekly</sy:updatePeriod><atom:link href="https://www.chenshaowen.com/en/tags/cron/atom.xml" rel="self" type="application/rss+xml"/><item><title>Configure Scheduled Tasks with systemd timer</title><link>https://www.chenshaowen.com/en/blog/how-to-configure-scheduled-task-using-systemd-timer.html</link><pubDate>Thu, 26 May 2022 00:00:00 +0000</pubDate><atom:modified>Thu, 26 May 2022 00:00:00 +0000</atom:modified><guid>https://www.chenshaowen.com/en/blog/how-to-configure-scheduled-task-using-systemd-timer.html</guid><description>1. Preparing the Scheduled Script If it is a Bash script, the first line needs to specify the interpreter.
1 2 mkdir -p /root/scripts vim /root/scripts/quick-clear.sh 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #!/bin/sh /usr/local/bin/kubectl --kubeconfig /root/.kube/config get pods --all-namespaces -o wide | grep Evicted | awk &amp;#39;{print $1,$2}&amp;#39; | xargs --no-run-if-empty -L1 /usr/local/bin/kubectl --kubeconfig /root/.</description><dc:creator>WeChat Official Account</dc:creator><category>Linux</category><category>systemd</category><category>Scheduled Tasks</category><category>Operations</category><category>Learning</category><category>cron</category><category>Automation</category><category>Best Practices</category></item></channel></rss>