<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help Cronjob Not Working in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/29113#M2299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What version?&lt;/P&gt;&lt;P&gt;And is this SecurePlatform or Gaia?&lt;/P&gt;&lt;P&gt;If Gaia, you should be using clish to configure cron jobs and not messing with OS files.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 23 Sep 2018 21:43:08 GMT</pubDate>
    <dc:creator>PhoneBoy</dc:creator>
    <dc:date>2018-09-23T21:43:08Z</dc:date>
    <item>
      <title>Help Cronjob Not Working</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/29111#M2297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;Hey guys,&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;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.&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;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.&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;[Expert@host]# crontab -u jobuser -l&lt;BR /&gt;0 1 1 1-12 * /home/admin/healthcheck.sh&lt;BR /&gt;0 2 1 1-12 * /home/admin/healthcheckexport.sh&lt;BR /&gt;25 3 * * * /home/admin/healthcheckexport.sh&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;After this I also created a healthjob cron in etc/cron.d and chmod 664 to give it proper permissions.&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;Referencing&amp;nbsp;&lt;A class="" href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk97700" rel="nofollow" style="color: #6d6e71; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;"&gt;How to create a cron job on SecurePlatform OS that runs every minute&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;[Expert@host]# cd /etc/cron.d/&lt;BR /&gt;[Expert@host]# ls -al&lt;BR /&gt;total 24&lt;BR /&gt;drwx------ 2 admin root 4096 Feb 16 16:55 .&lt;BR /&gt;drwxr-xr-x 47 admin root 12288 Feb 13 08:41 ..&lt;BR /&gt;-rw-rw-r--&amp;nbsp; 1 admin root 51 Feb 16 16:55 healthjob&lt;BR /&gt;-rw-r--r-- 1 admin root 188 Jan 31 2008 sysstat&lt;BR /&gt;[Expert@host]# cat healthjob&lt;BR /&gt;56 16 * * * root /home/admin/healthcheckexport.sh&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;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.&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;Feb 20 10:50:15 2018&amp;nbsp;host crond[31840]: (*system*) BAD FILE MODE (/etc/cron.d/healthjob)&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;I also made sure that both my scripts start with !#bin/bash I've also tried adding -f -x but that isn't recognized&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;Any help would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P style="color: #333333; background-color: #ffffff; border: 0px;"&gt;Please help it's urgent.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Sep 2018 06:27:11 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/29111#M2297</guid>
      <dc:creator>Mitchell_gayle</dc:creator>
      <dc:date>2018-09-23T06:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Help Cronjob Not Working</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/29112#M2298</link>
      <description>&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;
&lt;P&gt;Expert@host]# cd /etc/cron.d/&lt;BR /&gt;[Expert@host]# ls -al&lt;BR /&gt;total 24&lt;BR /&gt;drwx------ 2 admin root 4096 Feb 16 16:55 .&lt;BR /&gt;drwxr-xr-x 47 admin root 12288 Feb 13 08:41 ..&lt;BR /&gt;-rw-rw-r-- 1 admin root 51 Feb 16 16:55 healthjob&lt;BR /&gt;-rw-r--r-- 1 admin root 188 Jan 31 2008 sysstat&lt;BR /&gt;[Expert@host]# cat site healthjob&lt;BR /&gt;56 16 * * * root /home/admin/healthcheckexport.sh&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It seems that only&amp;nbsp;this thing is causing the issue.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 10:25:33 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/29112#M2298</guid>
      <dc:creator>Mitchell_gayle</dc:creator>
      <dc:date>2019-08-12T10:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help Cronjob Not Working</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/29113#M2299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What version?&lt;/P&gt;&lt;P&gt;And is this SecurePlatform or Gaia?&lt;/P&gt;&lt;P&gt;If Gaia, you should be using clish to configure cron jobs and not messing with OS files.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Sep 2018 21:43:08 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/29113#M2299</guid>
      <dc:creator>PhoneBoy</dc:creator>
      <dc:date>2018-09-23T21:43:08Z</dc:date>
    </item>
    <item>
      <title>Re: Help Cronjob Not Working</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/29114#M2300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would say the easiest should be by running those scripts as jobuser:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;su jobuser -c&amp;nbsp;/home/admin/healthcheck.sh‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;if you don't have right permissions on user profile or file access you should see it there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would follow this SK instead if you are on Gaia&amp;nbsp;&lt;A class="link-titled" href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk77300" title="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk77300"&gt;How to create a scheduled job (cron job) in Gaia with frequency of less than a day&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2018 04:09:09 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/29114#M2300</guid>
      <dc:creator>Kaspars_Zibarts</dc:creator>
      <dc:date>2018-09-25T04:09:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help Cronjob Not Working</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/29115#M2301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When in Gaia you want to use the crontab your best bet is to use clish to enter them.&lt;/P&gt;&lt;P&gt;Also do not forget to make sure the output can go somewhere (the bold part below).&lt;/P&gt;&lt;P&gt;Sample:&lt;/P&gt;&lt;P&gt;add cron job MDS_backup command "/backup/scripts/FWBackupMDS &lt;STRONG&gt;&amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;/STRONG&gt;" recurrence daily time 1:00&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Sep 2018 11:55:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/29115#M2301</guid>
      <dc:creator>Maarten_Sjouw</dc:creator>
      <dc:date>2018-09-25T11:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help Cronjob Not Working</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/29116#M2302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk90441" title="https://supportcenter.checkpoint.com/supportcenter/portal?eventSubmit_doGoviewsolutiondetails=&amp;amp;solutionid=sk90441"&gt;Shell script created by the user is not executed as expected when it is run from the cron job on Gaia / SecurePlatform&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Sep 2018 13:43:03 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/29116#M2302</guid>
      <dc:creator>JozkoMrkvicka</dc:creator>
      <dc:date>2018-09-29T13:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Help Cronjob Not Working</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/133379#M19840</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Sun, 07 Nov 2021 05:37:47 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/133379#M19840</guid>
      <dc:creator>Nandhakumar</dc:creator>
      <dc:date>2021-11-07T05:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help Cronjob Not Working</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/133464#M19852</link>
      <description>&lt;P&gt;Did you read and followed sk77300?&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 11:34:50 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/133464#M19852</guid>
      <dc:creator>Tobias_Moritz</dc:creator>
      <dc:date>2021-11-08T11:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help Cronjob Not Working</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/134219#M20089</link>
      <description>&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Nov 2021 07:31:31 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Help-Cronjob-Not-Working/m-p/134219#M20089</guid>
      <dc:creator>Nandhakumar</dc:creator>
      <dc:date>2021-11-17T07:31:31Z</dc:date>
    </item>
  </channel>
</rss>

