定时下载快速精密星历
来源:互联网 发布:淘宝旺旺代码生成器 编辑:程序博客网 时间:2024/04/27 15:59
采用linux的计划任务工具cron。
简单用法:
参考http://yaksayoo.blog.51cto.com/510938/162062/
1、查看当前用户的计划任务
crontab -l
2、添加或编辑计划任务
crontab -e
-----------------------------------------------------------
它的命令 采用 5个执行时间参数,然后是执行的命令
5个时间参数:
5个字段对应的含义如下:
* * * * *
分钟 小时 日期 月份 星期
------------------------
例如:
01 4-23/6 * * * csh /home/zhao/programs/gamit104/cron.sp3u > /dev/null 2>&1
这条计划任务的含义是:
每天的UTC 3:01, 9:01, 15:01, and 21:01 执行 cron.sp3u命令,并把命令输出到无底洞。
------------------ cron.sp3u文件内容如下-----------------
#!/bin/csh -f
# 6-hourly cron to download IGS ultra-rapid orbits from cddis
# The cron should run UTC 3:01, 9:01, 15:01, and 21:01
# Cron below is for Boston daylight savings time (our crons
# run on local time). The script test for UTC time and
# delays as needed).
# 01 4-23/6 * * * csh /home/zhao/programs/gamit104/cron.sp3u > /dev/null 2>&1
#
set sp3_dir = /home/zhao/work/RealTime/sp3_files
#
cd $sp3_dir >&! /dev/null
if( ! -e cron_sp3u.log ) then
echo `date` "Creating sp3 ultrapid download log" >! cron_sp3u.log
echo "--------------------------------------------------------------" >> cron_sp3u.log
endif
#
# Get current UTC time
set time = `date -u +"%Y %m %d %H %M"`
# Generate the name of sp3 file needed and see if we should
# wait for it to arrive (i.e., EST versus EDT).
set wait = `echo $time[4] | awk '{print int(($1-3)/6)*6-$1+3}' | awk '{if( $1 < 0 ) {print $1+6} else {print $1}}'`
#
# Generate the name of SP3 file needed
set wd = `doy $time[1] $time[2] $time[3]| head -2 | tail -n -1 | awk '{printf("%4d %d",$3,$7)}'`
# Normally $wait should 0 during EST and 1hr when EDT in effect (line below can have problems if delay is too long)
set sp3f = `echo $wd $time[4] $wait | awk '{if($3+$4-3 < 24 ) {printf("igu%4.4d%1d_%2.2d.sp3",$1,$2,$3+$4-3)} else {printf("igu%4.4d%1d_%2.2d.sp3.Z",$1,$2,$3+$4-3-24)}}'`
echo STATUS: `date +"%Y%m%d-%H%M"` : Getting $sp3f wait $wait hrs >> cron_sp3u.log
# See if we need to sleep
if( $wait > 0 ) then
sleep ${wait}h
endif
# Try to download file from cddis
set pw = `whoami`@`hostname`
while ( ! -e $sp3f )
ftp -ivn cddis.gsfc.nasa.gov <<! >&! /dev/null
user anonymous $pw
cd pub/gps/products/$wd[1]
ls $sp3f.Z
get $sp3f.Z
!
# Try to uncompress
if( -e ${sp3f}.Z ) then
uncompress ${sp3f}.Z
else
echo STATUS: `date +"%Y%m%d-%H%M"` : Getting $sp3f wait 1 minute >> cron_sp3u.log
sleep 1m
endif
end
#
# Thats all
- 定时下载快速精密星历
- 北斗精密星历下载
- GPS精密星历文件下载地址
- IGS精密星历及其下载(自PureSky_Memory的博客)
- 中国境内IGS站点及代号 以及 UCSD的GPS精密星历、IGS站数据等下载
- sh_gamit 快速星历错误
- 星历表的下载
- gamit 处理超快速星历
- 更快速更省电的全球ublox agps 星历下载服务-minigps出品
- 下载精确卫星星历文件 2015.3.31
- 精密空调
- 下载快速
- 迅雷定时下载
- 定时自动备份下载
- php 实现定时下载
- Linux 定时ftp下载
- 卫星星历详解
- GPS星历与历书
- hdu1548 [A strange lift] bfs
- OLE的使用
- 组件的注册
- 技术总结:OCX和DLL的区别
- MapX开发总结
- 定时下载快速精密星历
- Shellcode
- 安装VMware
- 总结失败的一天
- 在STATA硬盘上安装VMWARE,然后再安装RH9
- JOS学习笔记(十)
- 在STATA硬盘上安装VMWARE,然后再安装RH9
- VMware+RH9+Samba
- VMware工具的安装