I use many scripts through the schedulers to run many Check Point tasks and it works well. Your problem is your CP environment is not loaded (Ex: $FWDIR, $PCDIR, etc. are missing) when you execute a CP program through your script. Add this line ". /etc/bashrc" (valid if you are running GAIA) in the top of your script. Example:
#!/bin/bash
. /etc/bashrc # Load the Check Point environment if a GAIA (DOT space must be at the beginning of the line)
:
The rest of your script here
If my script is running on a SMB (ex 1400, 1500, etc.), I use: . /pfrm2.0/etc/bashrc