You can automate cron jobs with
crontab -e. Since
crontab -e invokes the editor specified by
VISUAL is not set, specify some script as
cat <<'EOF' >"$script"
1 2 3 4 5 new job #job2
VISUAL="$script" crontab -e
rm -f "$script"
There's no intrinsic notion of job names; you can easily make up one by adding a comment like
#jobname at the end of each line as in the example above.
crontab -e, you may find it easier to dump the current file, edit it and install the new version or keep a master copy and install it when you change it. Using a master copy means that you must not edit the crontab through other means, or your changes will be overridden. Dumping the current file and editing it means that if something or someone else edits the crontab at the same time, whoever installs first will have their changes overridden; some versions of
crontab prevent this by locking the file while
crontab -e is in operation, but I don't know if Solaris's does.