Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

docker compose cron

For those who wants to use a simple and lightweight image:

FROM alpine:3.6

# copy crontabs for root user
COPY config/cronjobs /etc/crontabs/root

# start crond with log level 8 in foreground, output to stderr
CMD ["crond", "-f", "-d", "8"]


Where cronjobs is the file that contains your cronjobs, in this form:

* * * * * echo "hello stackoverflow" >> /test_file 2>&1
# remember to end this file with an empty new line
Comment

PREVIOUS NEXT
Code Example
Python :: python capture stdout 
Python :: nan vs nat pandas 
Python :: is there a null data type in python 
Python :: anonymous function python 
Python :: add values from 2 columns to one pandas 
Python :: Python RegEx re.compile() 
Python :: drop row pandas column value not a number 
Python :: matplotlib multiple bar plot 
Python :: change part of a text file python 
Python :: linkedlist python 
Python :: python web scraping 
Python :: what does the .item() do in python 
Python :: title() in python 
Python :: plt.hist bins 
Python :: concatenate string in python 
Python :: add header info in django response 
Python :: django edit object foreign key id 
Python :: child class in python 
Python :: selecting a specific value and corrersponding value in df python 
Python :: Python list append tutorial 
Python :: python multidimensional dictionary 
Python :: manytomany django add bulk create 
Python :: js choice function 
Python :: install python anaconda 
Python :: pdf to word 
Python :: array sort in python 
Python :: how to test that an exception was raise using pytest 
Python :: Python RegEx SubString – re.sub() Syntax 
Python :: Install Python2 and Python 3 
Python :: Requested runtime (Python-3.7.6) is not available for this stack (heroku-20). 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =