sbt run
cd your-project-pwd
sbt ‘run-main your-main’ > out.txt
cron table
*6**** /usr/batch/test1
每天6点执行
test1脚本中即可添加sbt run的内容。
栗子:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
#!/bin/sh # # --------------------------------------------------------------------- # Auto parser install script. # --------------------------------------------------------------------- # echo 'export RDB_PARSER_PROJECT_PATH=your-project-path' >> /etc/profile . /etc/profile echo ' * 1 * * * root $PWD/auto_parser_ff' >> /etc/crontab echo ' * 7 * * * root $PWD/auto_parser_tf' >> /etc/crontab echo ' * 14 * * * root $PWD/auto_parser_mf' >> /etc/crontab |