Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Automating Export/Import with Unix Crontabs | ||||||||
Line: 21 to 21 | ||||||||
You'd specify -i={filename} and -e={filename} arguments, instead of the -a={application} , -d={database} , and such. | ||||||||
Changed: | ||||||||
< < | To see this argument list, run appx -u from the Unix command line, or appxutil -u from a DOS popup box. | |||||||
> > | To see this argument list, run appx -u from the Unix command line. | |||||||
(See Moving Files Between Platforms for further discussion of 'Endian' byte order conversion.) | ||||||||
Line: 29 to 29 | ||||||||
1. Exporting and Importing via APPX menu system | ||||||||
Changed: | ||||||||
< < | This requires recording an APPX action script (which you do interactively at the keyboard). You then set up a batch script to replay that script in unattended mode: | |||||||
> > | This requires recording an APPX action script (which you do interactively at the keyboard). You then set up a batch script to replay that script in unattended mode: | |||||||
| ||||||||
Changed: | ||||||||
< < | Record a Script | |||||||
> > | Record a Script | |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < | Play Back the Script | |||||||
> > | Play Back the Script | |||||||
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < | If you wanted to run a bunch of these in sequence via cron in background, you are probably best off setting up an external batch file that looks like the following, and calling this batch file from cron: | |||||||
> > | If you wanted to run a series of these in sequence via cron in background, you are probably best off setting up an external batch file that looks like the following, and calling this batch file from cron: | |||||||
# Run first APPX script |
Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
Added: | ||||||||
> > |
Automating Export/Import with Unix Crontabs"Can I run an APPX process via a Unix command (one liner) to Export and Import? I would like to setup a crontab to handle this if I can." Depending on what you're doing, either one might be a 1-step or a 2-step process. For example, Export may consist of:
2. Converting files from ASCII to 'brf', and back You can put the commands: appx -e=filename (for Export) andappx -i=filename (for Import)
... into batch scripts or crontab entries in the same way that you'd put an entry in to run an APPX process.
You'd specify -i={filename} and -e={filename} arguments, instead of the -a={application} , -d={database} , and such.
To see this argument list, run appx -u from the Unix command line, or appxutil -u from a DOS popup box.
(See Moving Files Between Platforms for further discussion of 'Endian' byte order conversion.)
1. Exporting and Importing via APPX menu system This requires recording an APPX action script (which you do interactively at the keyboard). You then set up a batch script to replay that script in unattended mode: Record a Script
Play Back the Script
# Run first APPX script
# Run second APPX script
... etc.
You may be wondering what that "appx" line is doing. OK, here's the scoop.
"2>&1" says to redirect stderr into stdout. ">/dev/null" says to throw that stdout stream away. I think that's what most people do.
However, occasionally errors get reported on that stream, so IMHO it's useful to keep it, either for a few days (in case you don't notice a problem until later) or at least until the next time the script is run.
For example, to save the stdout/stderr stream until the next run of the same script, you could use a line like:
appx 2>&1 >/tmp/export.script
If you wanted to be fancy and save these by date, so that you could store a week (or more's worth at a time), you could do something like:
appx 2>&1 >/tmp/export.script.`date +"%y%m%d.M"`
That mishmash, when executed, will resolve to a filename like
/tmp/export.script.990527.0322
... which embeds the date and time of the APPX script's START of execution, into the filename.
Of course, if you do this, you'll be creating a new file in /tmp each time you run the cron entry, so be warned that you'll have to create some sort of UNIX shellscript to remove these when you no longer want them around, or remember to delete them periodically, so that /tmp doesn't fill up.
(See additional documentation for further discussion of Keystroke Recording and Playback.) Comments:Read what other users have said about this page or add your own comments. |