- Products
- Learn
- Local User Groups
- Partners
- More
Introduction to Lakera:
Securing the AI Frontier!
Quantum Spark Management Unleashed!
Check Point Named Leader
2025 Gartner® Magic Quadrant™ for Hybrid Mesh Firewall
HTTPS Inspection
Help us to understand your needs better
CheckMates Go:
SharePoint CVEs and More!
Hey guys,
So, I want to setup a couple cronjobs to run a few bash scripts on my gateways. One being the healthcheck.sh. I then created an export script to take the two files it creates and export it to an FTP server.
Both of my shell scripts can be executed manually but when I try to setup cronjobs, they don't work. I created a user called jobuser to execute these.
[Expert@host]# crontab -u jobuser -l
0 1 1 1-12 * /home/admin/healthcheck.sh
0 2 1 1-12 * /home/admin/healthcheckexport.sh
25 3 * * * /home/admin/healthcheckexport.sh
Here you can see I have two schedules, one to run the healthcheck first then to run the export, then I have a third that I was just testing with live to see why or why it isnt working.
After this I also created a healthjob cron in etc/cron.d and chmod 664 to give it proper permissions.
Referencing How to create a cron job on SecurePlatform OS that runs every minute
[Expert@host]# cd /etc/cron.d/
[Expert@host]# ls -al
total 24
drwx------ 2 admin root 4096 Feb 16 16:55 .
drwxr-xr-x 47 admin root 12288 Feb 13 08:41 ..
-rw-rw-r-- 1 admin root 51 Feb 16 16:55 healthjob
-rw-r--r-- 1 admin root 188 Jan 31 2008 sysstat
[Expert@host]# cat healthjob
56 16 * * * root /home/admin/healthcheckexport.sh
When I restart the cron service and tail /var/log/cron I get BAD FILE MODE which just means permission issue as far as I know in the unix. I even chmod to 777 for fun and no luck.
Feb 20 10:50:15 2018 host crond[31840]: (*system*) BAD FILE MODE (/etc/cron.d/healthjob)
I also made sure that both my scripts start with !#bin/bash I've also tried adding -f -x but that isn't recognized
Any help would be greatly appreciated.
Please help it's urgent.
Expert@host]# cd /etc/cron.d/
[Expert@host]# ls -al
total 24
drwx------ 2 admin root 4096 Feb 16 16:55 .
drwxr-xr-x 47 admin root 12288 Feb 13 08:41 ..
-rw-rw-r-- 1 admin root 51 Feb 16 16:55 healthjob
-rw-r--r-- 1 admin root 188 Jan 31 2008 sysstat
[Expert@host]# cat site healthjob
56 16 * * * root /home/admin/healthcheckexport.sh
It seems that only this thing is causing the issue.
What version?
And is this SecurePlatform or Gaia?
If Gaia, you should be using clish to configure cron jobs and not messing with OS files.
I would say the easiest should be by running those scripts as jobuser:
su jobuser -c /home/admin/healthcheck.sh
if you don't have right permissions on user profile or file access you should see it there
I would follow this SK instead if you are on Gaia How to create a scheduled job (cron job) in Gaia with frequency of less than a day
When in Gaia you want to use the crontab your best bet is to use clish to enter them.
Also do not forget to make sure the output can go somewhere (the bold part below).
Sample:
add cron job MDS_backup command "/backup/scripts/FWBackupMDS >/dev/null 2>&1" recurrence daily time 1:00
Hi,
i have scheduled cronjob to take auto backup of firewall config. The script works well and also it run on scheduled time perfectly. the issue here is, it doesnt survive reboot.
If firewall reboot, scheduled job in crontab got auto vanished. How can make it permanent and it should not auto vanish after gateway reboot or upgrade.
Did you read and followed sk77300?
It sounds like you did create the cronjob manually in expert mode and used the default account "admin" for that. This is unsupported and shows the symtomes you said. It is stated in that sk.
Either use clish (or Gaia portal) for creating cronjob, or follow sk77300 when you need the flexibility of manual created cron jobs with crontab -e by creating a special user for that.
Thanks. I haven't walk through that SK. I tried to schedule job using Gaia clish command and it worked well. Verified that cronjobs were still present in device after in place upgrade.
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
User | Count |
---|---|
12 | |
11 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 |
Tue 07 Oct 2025 @ 10:00 AM (CEST)
Cloud Architect Series: AI-Powered API Security with CloudGuard WAFThu 09 Oct 2025 @ 10:00 AM (CEST)
CheckMates Live BeLux: Discover How to Stop Data Leaks in GenAI Tools: Live Demo You Can’t Miss!Thu 09 Oct 2025 @ 10:00 AM (CEST)
CheckMates Live BeLux: Discover How to Stop Data Leaks in GenAI Tools: Live Demo You Can’t Miss!Wed 22 Oct 2025 @ 11:00 AM (EDT)
Firewall Uptime, Reimagined: How AIOps Simplifies Operations and Prevents OutagesAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY