FrontPage

Ubuntu

Virtual Box

共有フォルダ

# Windows Share Dr 
alias share='cd $SHARE'
sudo mount.vboxsf share ~/share
export SHARE=~/share/

python path

$ which python
/usr/bin/python

cron

http://qiita.com/gano/items/802519add83c524e3019

テストスクリプト crontest.py

# -*- coding: utf-8 -*-
import sys
with open("hoge.txt", "w") as f:
   f.write("hello python")
   f.write(str(sys.version))

結局

/etc/cron.d/usercron
# /etc/cron.d/usercron

SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/home/fifi

# m h dom mon dow user  command
# * * * * * root  $HOME/anaconda3/bin/python $HOME/cron-script/crontest/crontest.py
# */1 * * * * root  $SHELL $HOME/cron-script/crontest/crontest.sh

# TEST SCRIPT
CRONSCRIPT = /home/fifi/cron-script/crontest
CLOG = /home/fifi/cron-script/crontest/log
*/1 * * * * root which python >> $CLOG/whichpython.log
*/1 * * * * root echo "echo log" >> $CLOG/cron-echo.log

*/1 * * * * root python $CRONSCRIPT/crontest.sh
トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS